Skip to content

Commit 3bf2c64

Browse files
committed
Add support for bounding box
1 parent 41841b3 commit 3bf2c64

File tree

8 files changed

+641
-67
lines changed

8 files changed

+641
-67
lines changed

build/scripting/Host.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,10 @@ var CCLScripting = function(workerUrl){
399399
this.DOM.appendChild(_("text",text));
400400
};
401401
this.__defineSetter__("visible", function(f){
402-
this.DOM.style.visible = f ? "visible" : "hidden";
402+
this.DOM.style.visibility = f ? "visible" : "hidden";
403403
});
404404
this.__defineGetter__("visible", function(f){
405-
return this.DOM.style.visible === "hidden" ? false : true;
405+
return this.DOM.style.visibility === "hidden" ? false : true;
406406
});
407407
this.__defineSetter__("alpha", function(f){
408408
this.setAlpha(f);
@@ -526,10 +526,10 @@ var CCLScripting = function(workerUrl){
526526
this.DOM.appendChild(defaultGroupWithEffects);
527527
/** PROPS **/
528528
this.__defineSetter__("visible", function(f){
529-
this.DOM.style.visible = f ? "visible" : "hidden";
529+
this.DOM.style.visibility = f ? "visible" : "hidden";
530530
});
531531
this.__defineGetter__("visible", function(f){
532-
return this.DOM.style.visible === "hidden" ? false : true;
532+
return this.DOM.style.visibility === "hidden" ? false : true;
533533
});
534534
this.__defineSetter__("x", function(f){
535535
this.setX(f);
@@ -669,6 +669,7 @@ var CCLScripting = function(workerUrl){
669669
});
670670
applyFill(state.lastPath, this);
671671
applyStroke(state.lastPath, this);
672+
defaultGroup.appendChild(state.lastPath);
672673
}
673674
__(state.lastPath,{
674675
"d": state.lastPath.getAttribute("d") + " L" + params.join(" ")
@@ -681,6 +682,7 @@ var CCLScripting = function(workerUrl){
681682
});
682683
applyFill(state.lastPath, this);
683684
applyStroke(state.lastPath, this);
685+
defaultGroup.appendChild(state.lastPath);
684686
}
685687
__(state.lastPath,{
686688
"d": state.lastPath.getAttribute("d") + " Q" + params.join(" ")
@@ -963,10 +965,10 @@ var CCLScripting = function(workerUrl){
963965
data.scaleY = 1;
964966
data.children = [];
965967
this.__defineSetter__("visible", function(f){
966-
this.DOM.style.visible = f ? "visible" : "hidden";
968+
this.DOM.style.visibility = f ? "visible" : "hidden";
967969
});
968970
this.__defineGetter__("visible", function(f){
969-
return this.DOM.style.visible === "hidden" ? false : true;
971+
return this.DOM.style.visibility === "hidden" ? false : true;
970972
});
971973
this.__defineSetter__("alpha", function(f){
972974
this.DOM.style.opacity = f;
@@ -1097,10 +1099,10 @@ var CCLScripting = function(workerUrl){
10971099
data.scaleX = 1;
10981100
data.scaleY = 1;
10991101
this.__defineSetter__("visible", function(f){
1100-
this.DOM.style.visible = f ? "visible" : "hidden";
1102+
this.DOM.style.visibility = f ? "visible" : "hidden";
11011103
});
11021104
this.__defineGetter__("visible", function(f){
1103-
return this.DOM.style.visible === "hidden" ? false : true;
1105+
return this.DOM.style.visibility === "hidden" ? false : true;
11041106
});
11051107
this.__defineGetter__("transform", function(f){
11061108
return {};

0 commit comments

Comments
 (0)