From 81372250d350950b7666cc5b5cc4a6a4ef80a67e Mon Sep 17 00:00:00 2001 From: vivid Date: Fri, 19 Aug 2016 11:53:47 +0900 Subject: [PATCH] stage boundRect bug fix --- dist/entry.js | 3 +++ dist/entry.min.js | 6 +++--- src/stage.js | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dist/entry.js b/dist/entry.js index 303de251d7..2e6034161b 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -12941,6 +12941,9 @@ Entry.Stage.prototype.initStage = function(b) { Entry.windowResized.attach(this, function() { Entry.stage.updateBoundRect(); }); + $(window).scroll(function() { + Entry.stage.updateBoundRect(); + }); a = function(a) { a.preventDefault(); var b = Entry.stage.getBoundRect(), e; diff --git a/dist/entry.min.js b/dist/entry.min.js index cb14d88159..71375b30ac 100644 --- a/dist/entry.min.js +++ b/dist/entry.min.js @@ -1191,9 +1191,9 @@ p.checkDevice=function(b){void 0!==b.company&&(b=[Entry.Utils.convertIntToHex(b. p.banHW=function(){var b=this.hwInfo,a;for(a in b)Entry.playground.mainWorkspace.blockMenu.banClass(b[a].name,!0)};Entry.BlockModel=function(){Entry.Model(this)};Entry.BlockModel.prototype.schema={id:null,x:0,y:0,type:null,params:{},statements:{},prev:null,next:null,view:null};Entry.BlockRenderModel=function(){Entry.Model(this)};Entry.BlockRenderModel.prototype.schema={id:0,type:Entry.STATIC.BLOCK_RENDER_MODEL,x:0,y:0,width:0,height:0,magneting:!1};Entry.BoxModel=function(){Entry.Model(this)};Entry.BoxModel.prototype.schema={id:0,type:Entry.STATIC.BOX_MODEL,x:0,y:0,width:0,height:0};Entry.DragInstance=function(b){Entry.Model(this);this.set(b)};Entry.DragInstance.prototype.schema={type:Entry.STATIC.DRAG_INSTANCE,startX:0,startY:0,offsetX:0,offsetY:0,absX:0,absY:0,prev:null,height:0,mode:0,isNew:!1};Entry.ThreadModel=function(){Entry.Model(this)};Entry.ThreadModel.prototype.schema={id:0,type:Entry.STATIC.THREAD_MODEL,x:0,y:0,width:0,minWidth:0,height:0};Entry.Stage=function(){this.variables={};this.background=new createjs.Shape;this.background.graphics.beginFill("#ffffff").drawRect(-480,-240,960,480);this.objectContainers=[];this.selectedObjectContainer=null;this.variableContainer=new createjs.Container;this.dialogContainer=new createjs.Container;this.selectedObject=null;this.isObjectClick=!1}; Entry.Stage.prototype.initStage=function(b){this.canvas=new createjs.Stage(b.id);this.canvas.x=320;this.canvas.y=180;this.canvas.scaleX=this.canvas.scaleY=2/1.5;createjs.Touch.enable(this.canvas);this.canvas.enableMouseOver(10);this.canvas.mouseMoveOutside=!0;this.canvas.addChild(this.background);this.canvas.addChild(this.variableContainer);this.canvas.addChild(this.dialogContainer);this.inputField=null;this.initCoordinator();this.initHandle();this.mouseCoordinate={x:0,y:0};if(Entry.isPhone())b.ontouchstart= function(a){Entry.dispatchEvent("canvasClick",a);Entry.stage.isClick=!0},b.ontouchend=function(a){Entry.stage.isClick=!1;Entry.dispatchEvent("canvasClickCanceled",a)};else{var a=function(a){Entry.dispatchEvent("canvasClick",a);Entry.stage.isClick=!0};b.onmousedown=a;b.ontouchstart=a;a=function(a){Entry.stage.isClick=!1;Entry.dispatchEvent("canvasClickCanceled",a)};b.onmouseup=a;b.ontouchend=a;$(document).click(function(a){Entry.stage.focused="entryCanvas"===a.target.id?!0:!1})}Entry.addEventListener("canvasClick", -function(a){Entry.stage.isObjectClick=!1});Entry.windowResized.attach(this,function(){Entry.stage.updateBoundRect()});a=function(a){a.preventDefault();var b=Entry.stage.getBoundRect(),e;-1