aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-28 13:58:34 -0800
committerPushkar Joshi2012-02-28 13:58:34 -0800
commite1a65d0c2a13e12ee53be98c731616e35aa07a41 (patch)
tree23d53b935d6e20e1bf822aa7e30686b39d45052a /js/helper-classes/RDGE
parent7cbd26d475eaad817042692f9116f9a24ae60997 (diff)
downloadninja-e1a65d0c2a13e12ee53be98c731616e35aa07a41.tar.gz
new anchor control guide rendering (smaller handles)
and clamp min. width and height to 1 while resizing subpaths
Diffstat (limited to 'js/helper-classes/RDGE')
-rwxr-xr-xjs/helper-classes/RDGE/GLSubpath.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/helper-classes/RDGE/GLSubpath.js b/js/helper-classes/RDGE/GLSubpath.js
index 7beb11b9..f3d8ad36 100755
--- a/js/helper-classes/RDGE/GLSubpath.js
+++ b/js/helper-classes/RDGE/GLSubpath.js
@@ -181,8 +181,8 @@ function GLSubpath() {
181 181
182 182
183 this.setWidth = function (newW) { 183 this.setWidth = function (newW) {
184 //todo this doesn't work in cases where the newW is zero or if the previous width was 0/1 (i.e. the path had become degenerate in width) 184 if (newW<1)
185 //todo same as above for the setHeight function below 185 newW=1; //clamp minimum width to 1
186 //scale the contents of this subpath to lie within this width 186 //scale the contents of this subpath to lie within this width
187 //determine the scale factor by comparing with the old width 187 //determine the scale factor by comparing with the old width
188 var oldWidth = this._BBoxMax[0]-this._BBoxMin[0]; 188 var oldWidth = this._BBoxMax[0]-this._BBoxMin[0];
@@ -210,6 +210,8 @@ function GLSubpath() {
210 this.makeDirty(); 210 this.makeDirty();
211 } 211 }
212 this.setHeight = function (newH) { 212 this.setHeight = function (newH) {
213 if (newH<1)
214 newH=1; //clamp minimum width to 1
213 //scale the contents of this subpath to lie within this height 215 //scale the contents of this subpath to lie within this height
214 //determine the scale factor by comparing with the old height 216 //determine the scale factor by comparing with the old height
215 var oldHeight = this._BBoxMax[1]-this._BBoxMin[1]; 217 var oldHeight = this._BBoxMax[1]-this._BBoxMin[1];