aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib')
-rwxr-xr-xjs/lib/geom/sub-path.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/lib/geom/sub-path.js b/js/lib/geom/sub-path.js
index 43420bc9..56c94df3 100755
--- a/js/lib/geom/sub-path.js
+++ b/js/lib/geom/sub-path.js
@@ -1106,6 +1106,14 @@ GLSubpath.prototype.importJSON = function(jo) {
1106 this._fillColor = jo.fillColor; 1106 this._fillColor = jo.fillColor;
1107 1107
1108 this._dirty = true; 1108 this._dirty = true;
1109 this.createSamples(false);
1110 this.offsetPerBBoxMin();
1111
1112 //compute and store the center of the bbox in local space
1113 var bboxMin = this.getBBoxMin();
1114 var bboxMax = this.getBBoxMax();
1115 var bboxMid = [0.5*(bboxMin[0]+bboxMax[0]),0.5*(bboxMin[1]+bboxMax[1]),0.5*(bboxMin[2]+bboxMax[2])];
1116 this.setCanvasCenterLocalCoord(bboxMid);
1109}; 1117};
1110 1118
1111GLSubpath.prototype.import = function( importStr ) { 1119GLSubpath.prototype.import = function( importStr ) {