//Debug.write("endDrawarrowline",this.startx,this.starty,this.endx,this.endy); maxx) maxx=this.startx; if (this.endx>maxx) maxx=this.endx; if (this.startymaxy) maxy=this.starty; if (this.endy>maxy) maxy=this.endy; var width = maxx-minx; var height = maxy-miny; //Debug.write("minx,miny,width,height: ",minx,miny,width,height); this.currentlayer = new lz.drawViewNew(this,{ name:tempName,x:minx,y:miny,width:width,height:height, opacity:this.currentdrawarrowOpacity}); this.currentlayer.fillstyle = '0x000000'; this.currentlayer.lineWidth = this.currentdrawarrowlinelineWidth; this.currentlayer.strokeStyle = this.currentdrawarrowlinestroke; //Debug.write("this.currentlayer: ",this.currentlayer); var t = new lz.drawArrowWhiteBoard(this.currentlayer,{x:0,y:0}); //Color //t.setTint(this.currentdrawarrowlinestroke,60); t.setColor(this.currentdrawarrowlinestroke); var tx = this.endx-this.startx; var ty = this.endy-this.starty; var gegenkathete = Math.abs(ty); var ankathete = Math.abs(tx); var hypothenuse = Math.sqrt((ankathete*ankathete)+(gegenkathete*gegenkathete)); var sinAlpha = (gegenkathete/hypothenuse); var alpha = Math.asin(sinAlpha); alpha = alpha/(Math.PI/180); var newx = 0; var newy = 0; if (tx>=0 && ty>=0){ t.setAttribute('rotation',(alpha-45)); } else if (tx<0 && ty>=0){ newx = width; t.setAttribute('rotation',(45+90-alpha)); } else if (tx<0 && ty<0){ newy = height; newx = width; t.setAttribute('rotation',(alpha+45+90)); } else if (tx>0 && ty<=0){ newy = height; t.setAttribute('rotation',(45-alpha-90)); } t.setAttribute('x',newx); t.setAttribute('y',newy); //Scaling var basicLength = Math.sqrt((t.width*t.width)+(t.width*t.width)); t.getDisplayObject()._xscale = (hypothenuse/basicLength)*100; t.getDisplayObject()._yscale = (hypothenuse/basicLength)*100; //Set previous to null this.prevx = null; this.prevy = null; //Add Layer to global Layer this.layers.push(this.currentlayer); ]]> this.drawarrowlineregisterFinal(); this.currentlayer = new LzView(); //Debug.write("t: ",t); var actionObject = new Array(); actionObject[0] = 'drawarrow'; actionObject[1] = currentlayer.fillstyle; actionObject[2] = currentlayer.lineWidth; actionObject[3] = currentlayer.strokeStyle; actionObject[4] = this.startx; actionObject[5] = this.starty; actionObject[6] = this.endx; actionObject[7] = this.endy; actionObject[8] = this.currentdrawarrowOpacity; actionObject[9] = this.counter; actionObject[10] = currentlayer.x; actionObject[11] = currentlayer.y; actionObject[12] = currentlayer.width; actionObject[13] = currentlayer.height; actionObject[14] = this.currentlayer.name; this.baseactionobjectList.push(actionObject); this.onsharedMessage('draw',actionObject); =0 && ty>=0){ t.setAttribute('rotation',(alpha-45)); } else if (tx<0 && ty>=0){ newx = lastActionObject[lastActionObject.length-3]; t.setAttribute('rotation',(45+90-alpha)); } else if (tx<0 && ty<0){ newy = lastActionObject[lastActionObject.length-2]; newx = lastActionObject[lastActionObject.length-3]; t.setAttribute('rotation',(alpha+45+90)); } else if (tx>0 && ty<=0){ newy = lastActionObject[lastActionObject.length-2]; t.setAttribute('rotation',(45-alpha-90)); } t.setAttribute('x',newx); t.setAttribute('y',newy); //Scaling var basicLength = Math.sqrt((t.width*t.width)+(t.width*t.width)); t.getDisplayObject()._xscale = (hypothenuse/basicLength)*100; t.getDisplayObject()._yscale = (hypothenuse/basicLength)*100; this.currentlayer.fillstyle = lastActionObject[1]; this.currentlayer.lineWidth = lastActionObject[2]; this.currentlayer.strokeStyle = lastActionObject[3]; ]]> =0 && ty>=0){ t.setAttribute('rotation',(alpha-45)); } else if (tx<0 && ty>=0){ t.setAttribute('rotation',(45+90-alpha)); } else if (tx<0 && ty<0){ t.setAttribute('rotation',(alpha+45+90)); } else if (tx>0 && ty<=0){ t.setAttribute('rotation',(45-alpha-90)); } //Scaling var basicLength = Math.sqrt((t.width*t.width)+(t.width*t.width)); t.getDisplayObject()._xscale = (hypothenuse/basicLength)*100; t.getDisplayObject()._yscale = (hypothenuse/basicLength)*100; //Set previous to null this.prevx = null; this.prevy = null; currentlayer.strokeStyle = this.currentdrawarrowlinestroke; currentlayer.lineWidth = this.currentdrawarrowlinelineWidth; currentlayer.fillstyle = '0x000000'; ]]> = this.endy) { currentlayer.lineWidth = this.currentrectangleineWidth; currentlayer.beginPath(); currentlayer.moveTo(this.startx,this.starty); //1 currentlayer.lineTo(this.startx-point_distance_x,this.starty-point_distance_y); //2 currentlayer.lineTo(this.endx-point_distance_x*3,this.endy+point_distance_y); //3 currentlayer.lineTo(this.endx-point_distance_x*4,this.endy); //4 currentlayer.lineTo(this.endx,this.endy); //5 currentlayer.lineTo(this.endx,this.endy+point_distance_y*4); //6 currentlayer.lineTo(this.endx-point_distance_x,this.endy+point_distance_y*3); //7 currentlayer.lineTo(this.startx+point_distance_x,this.starty+point_distance_y); //8 currentlayer.lineTo(this.startx,this.starty); //9 this.closePath(); currentlayer.strokeStyle = 0x000000; currentlayer.stroke(); currentlayer.fillStyle = this.currentdrawarrowlinelineWidth; currentlayer.fill(); } ]]> //Debug.write("endDrawarrowline",this.startx,this.starty,this.endx,this.endy); maxx) maxx=this.startx; if (this.endx>maxx) maxx=this.endx; if (this.startymaxy) maxy=this.starty; if (this.endy>maxy) maxy=this.endy; var width = maxx-minx; var height = maxy-miny; //Debug.write("minx,miny,width,height: ",minx,miny,width,height); this.currentlayer = new lz.drawViewNew(this,{ name:tempName,x:minx-1,y:miny-1,width:width,height:height, opacity:this.currentdrawarrowOpacity}); this.currentlayer.fillstyle = '0x000000'; this.currentlayer.lineWidth = this.currentdrawarrowlinelineWidth; this.currentlayer.strokeStyle = this.currentdrawarrowlinestroke; //Debug.write("this.currentlayer: ",this.currentlayer); var t = new lz.drawArrowWhiteBoard(this.currentlayer,{x:0,y:0}); //Color //t.setTint(this.currentdrawarrowlinestroke,60); t.setColor(this.currentdrawarrowlinestroke); var tx = this.endx-this.startx; var ty = this.endy-this.starty; var gegenkathete = Math.abs(ty); var ankathete = Math.abs(tx); var hypothenuse = Math.sqrt((ankathete*ankathete)+(gegenkathete*gegenkathete)); var sinAlpha = (gegenkathete/hypothenuse); var alpha = Math.asin(sinAlpha); alpha = alpha/(Math.PI/180); var newx = 0; var newy = 0; if (tx>=0 && ty>=0){ t.setAttribute('rotation',(alpha-45)); } else if (tx<0 && ty>=0){ newx = width; t.setAttribute('rotation',(45+90-alpha)); } else if (tx<0 && ty<0){ newy = height; newx = width; t.setAttribute('rotation',(alpha+45+90)); } else if (tx>0 && ty<=0){ newy = height; t.setAttribute('rotation',(45-alpha-90)); } t.setAttribute('x',newx); t.setAttribute('y',newy); //Scaling var basicLength = Math.sqrt((t.width*t.width)+(t.width*t.width)); t.getDisplayObject()._xscale = (hypothenuse/basicLength)*100; t.getDisplayObject()._yscale = (hypothenuse/basicLength)*100; //Set previous to null this.prevx = null; this.prevy = null; //Add Layer to global Layer this.layers.push(this.currentlayer); ]]> this.drawarrowlineregisterFinal(); this.currentlayer = new LzView(); //Debug.write("t: ",t);