Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/helper/boundingBoxAll.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/helper/boundingBoxAll.lzx?rev=1773334&r1=1773333&r2=1773334&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/helper/boundingBoxAll.lzx (original) +++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/helper/boundingBoxAll.lzx Fri Dec 9 08:26:19 2016 @@ -9,7 +9,7 @@ with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -19,15 +19,14 @@ --> <library> - <include href="utils/states/resizestatemin.lzx"/> <!-- - The order of views is important in this class - otherwise the scrollbar of the swfPresentation would be not visible or partly overlayed - - - this is the selection Box for all Whiteboard Objects + The order of views is important in this class + otherwise the scrollbar of the swfPresentation would be not visible or partly overlayed + + + this is the selection Box for all Whiteboard Objects --> <class name="boundingBoxAllRotationMarger" extends="view" @@ -36,44 +35,44 @@ <attribute name="dragStarted" value="false" type="boolean"/> <handler name="onmouseover"> - lz.Cursor.setCursorGlobal("arrow_rotate_panel_cursor"); - </handler> - <handler name="onmouseout"> - lz.Cursor.unlock(); - </handler> - - <handler name="onx" args="x"> - this.doMoveDragPoint(); - </handler> - <handler name="ony" args="y"> - this.doMoveDragPoint(); - </handler> - - <method name="doMoveDragPoint"> - if (!this.dragStarted) { - return; - } - parent.doMoveDragPoint(this.x+12,this.y+12); - </method> - - <handler name="onmousedown"> - this.dragStarted = true; - parent.doStartDragPoint(); - this.dragger.apply(); - </handler> - <handler name="onmouseup"> - this.dragStarted = false; - this.dragger.remove(); - parent.endDrawClipArtDrag(); - lz.Cursor.unlock(); - </handler> - - <dragstate name="dragger" /> - + lz.Cursor.setCursorGlobal("arrow_rotate_panel_cursor"); + </handler> + <handler name="onmouseout"> + lz.Cursor.unlock(); + </handler> + + <handler name="onx" args="x"> + this.doMoveDragPoint(); + </handler> + <handler name="ony" args="y"> + this.doMoveDragPoint(); + </handler> + + <method name="doMoveDragPoint"> + if (!this.dragStarted) { + return; + } + parent.doMoveDragPoint(this.x+12,this.y+12); + </method> + + <handler name="onmousedown"> + this.dragStarted = true; + parent.doStartDragPoint(); + this.dragger.apply(); + </handler> + <handler name="onmouseup"> + this.dragStarted = false; + this.dragger.remove(); + parent.endDrawClipArtDrag(); + lz.Cursor.unlock(); + </handler> + + <dragstate name="dragger" /> + </class> - + <class name="boundingBoxAll" extends="view" focusable="true"> - + <!-- <method name="removeIt"> canvas._drawarea.setAttribute('boundingIsActive',true); @@ -102,18 +101,18 @@ <attribute name="objRef" value="null" /> <attribute name="whiteboardRef" value="null" /> <attribute name="doHandlerUpdates" value="false" type="boolean" /> - <attribute name="boundingDoUpdateOnInit" value="true" type="boolean" /> - - <attribute name="canBeDragged" value="true" type="boolean" /> - <attribute name="canBeResized" value="true" type="boolean" /> - - <!--- Minimum width for the windowy, default: 60. - @keywords final --> - <attribute name="minwidth" value="2"/> - - <!--- Minimum height for the window, default: 50. - @keywords final --> - <attribute name="minheight" value="2"/> + <attribute name="boundingDoUpdateOnInit" value="true" type="boolean" /> + + <attribute name="canBeDragged" value="true" type="boolean" /> + <attribute name="canBeResized" value="true" type="boolean" /> + + <!--- Minimum width for the windowy, default: 60. + @keywords final --> + <attribute name="minwidth" value="2"/> + + <!--- Minimum height for the window, default: 50. + @keywords final --> + <attribute name="minheight" value="2"/> <method name="__LZRemoveItem" args="itemRef"> this.whiteboardRef.deleteItemByName(this.objRef.name); @@ -122,15 +121,15 @@ <handler name="oninit"> <![CDATA[ - if (!this.boundingDoUpdateOnInit) { - if ($debug) Debug.write("DESTROY the clickable view"); - //this._innerDrag.destroy(); - } - - if (!this.canBeResized) { - this._gripperNoResize.setAttribute("visibility","visible"); - this._gripperResize.setAttribute("visibility","hidden"); - } + if (!this.boundingDoUpdateOnInit) { + if ($debug) Debug.write("DESTROY the clickable view"); + //this._innerDrag.destroy(); + } + + if (!this.canBeResized) { + this._gripperNoResize.setAttribute("visibility","visible"); + this._gripperResize.setAttribute("visibility","hidden"); + } this.setAttribute('x',this.ex); this.setAttribute('y',this.ey); @@ -145,8 +144,8 @@ this._editText.setAttribute("visibility","visible"); } - //FIXME - Add Ellipse, Line and Free Draw Tool to it - if (this.objRef.name.indexOf('rectangle') >= 0){ + //FIXME - Add Ellipse, Line and Free Draw Tool to it + if (this.objRef.name.indexOf('rectangle') >= 0){ if ($debug) Debug.write("this.objRef._innerRect ",this.objRef._innerRect); if ($debug) Debug.write("strokeStyle: ",this.objRef._innerRect.strokeStyle); @@ -171,22 +170,22 @@ this.whiteboardRef.currentrectangleineWidth = this.objRef._innerRect.lineWidth; } else if (this.objRef.name.indexOf('swf') >= 0) { - this.setAttribute("innerInsetScrollbars",16); - } else if (this.objRef.name.indexOf('clipart') >= 0) { - this.canBeResized = false; - this._gripperNoResize.setAttribute("visibility","visible"); - this._gripperResize.setAttribute("visibility","hidden"); - - new lz.boundingBoxAllRotationMarger(this,{ - x:this.objRef.clipart.clipArtEndx-12, - y:this.objRef.clipart.clipArtEndy-12 - }); - - } - - - this.whiteboardRef.parent.parent._propertyPanel.loadPanelByBoundingBox(this.whiteboardRef,this.objRef); - + this.setAttribute("innerInsetScrollbars",16); + } else if (this.objRef.name.indexOf('clipart') >= 0) { + this.canBeResized = false; + this._gripperNoResize.setAttribute("visibility","visible"); + this._gripperResize.setAttribute("visibility","hidden"); + + new lz.boundingBoxAllRotationMarger(this,{ + x:this.objRef.clipart.clipArtEndx-12, + y:this.objRef.clipart.clipArtEndy-12 + }); + + } + + + this.whiteboardRef._propPanel.loadPanelByBoundingBox(this.whiteboardRef,this.objRef); + this.doUpdateAction(); ]]> </handler> @@ -200,27 +199,22 @@ </method> <method name="endDrawClipArtDrag"> - this.whiteboardRef.endDrawClipArtDrag(this.objRef); - this.whiteboardRef.reselectShowObjectBounds(this.objRef.name); - </method> - + this.whiteboardRef.endDrawClipArtDrag(this.objRef); + this.whiteboardRef.reselectShowObjectBounds(this.objRef.name); + </method> + <!-- Do update the Selection-Box, in case another Moderator or User has moved the Object while you have it in focus --> - <method name="sendRemoteUpdate" args="obj"> - <![CDATA[ - - if (this.objRef.name == obj.name) { - - this.resetValues(); - - } - - ]]> - </method> - - + <method name="sendRemoteUpdate" args="obj"> + <![CDATA[ + if (this.objRef.name == obj.name) { + this.resetValues(); + } + ]]> + </method> + <method name="resetValues"> this.ex = this.objRef.x; this.ey = this.objRef.y; @@ -233,115 +227,115 @@ this.setStartValues(); </method> - <method name="doUpdateAction" > - this.setAttribute('doHandlerUpdates',true); - if (this.boundingDoUpdateOnInit) { - this._innerDrag.onmousedown.sendEvent(); - } - </method> - - <handler name="onheight"> - if(this.doHandlerUpdates){ - this.objRef.setAttribute('height',this.height); - } - </handler> - - <handler name="onwidth"> - if(this.doHandlerUpdates){ - this.objRef.setAttribute('width',this.width); - } - </handler> - - <handler name="onx"> - if(this.doHandlerUpdates){ - - var tx = this.getAttributeRelative('x',objRef); - - if(this.objRef.parent.isSnapToGrid){ - tx = Math.round(tx/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth; - this.setAttribute("x",Math.round(this.x/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth) - } - - this.objRef.setAttribute('x',tx); - } - </handler> - - <handler name="ony"> - if(this.doHandlerUpdates){ - - var ty = this.getAttributeRelative('y',objRef); - - if(this.objRef.parent.isSnapToGrid){ - ty = Math.round(ty/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth; - this.setAttribute("y",Math.round(this.y/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth) - } - - this.objRef.setAttribute('y',ty); - } - </handler> - - <handler name="onkeydown" args="key"> - if ($debug) Debug.write("onkeydown ",key); - - //this.objRef.parent.UpdateByObject(this.objRef); - - if (key == 46) { - this.__LZRemoveItem(this.objRef); - } else if (key == 40) { - var shiftPressed = lz.Keys.isKeyDown("shift"); - if ($debug) Debug.write("shiftPressed ",shiftPressed); - this.doHandlerUpdates = true; - this.setAttribute("y",this.y+(shiftPressed ? 20 : 2)); - this.doHandlerUpdates = false; - this.objRef.parent.UpdateByObject(this.objRef); + <method name="doUpdateAction" > + this.setAttribute('doHandlerUpdates',true); + if (this.boundingDoUpdateOnInit) { + this._innerDrag.onmousedown.sendEvent(); + } + </method> + + <handler name="onheight"> + if(this.doHandlerUpdates){ + this.objRef.setAttribute('height',this.height); + } + </handler> + + <handler name="onwidth"> + if(this.doHandlerUpdates){ + this.objRef.setAttribute('width',this.width); + } + </handler> + + <handler name="onx"> + if(this.doHandlerUpdates){ + + var tx = this.getAttributeRelative('x',objRef); + + if(this.objRef.parent.isSnapToGrid){ + tx = Math.round(tx/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth; + this.setAttribute("x",Math.round(this.x/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth) + } + + this.objRef.setAttribute('x',tx); + } + </handler> + + <handler name="ony"> + if(this.doHandlerUpdates){ + + var ty = this.getAttributeRelative('y',objRef); + + if(this.objRef.parent.isSnapToGrid){ + ty = Math.round(ty/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth; + this.setAttribute("y",Math.round(this.y/this.objRef.parent.gridWidth)*this.objRef.parent.gridWidth) + } + + this.objRef.setAttribute('y',ty); + } + </handler> + + <handler name="onkeydown" args="key"> + if ($debug) Debug.write("onkeydown ",key); + + //this.objRef.parent.UpdateByObject(this.objRef); + + if (key == 46) { + this.__LZRemoveItem(this.objRef); + } else if (key == 40) { + var shiftPressed = lz.Keys.isKeyDown("shift"); + if ($debug) Debug.write("shiftPressed ",shiftPressed); + this.doHandlerUpdates = true; + this.setAttribute("y",this.y+(shiftPressed ? 20 : 2)); + this.doHandlerUpdates = false; + this.objRef.parent.UpdateByObject(this.objRef); this.setStartValues(); - } else if (key == 38) { - var shiftPressed = lz.Keys.isKeyDown("shift"); - this.doHandlerUpdates = true; - this.setAttribute("y",this.y-(shiftPressed ? 20 : 2)); - this.doHandlerUpdates = false; - this.objRef.parent.UpdateByObject(this.objRef); + } else if (key == 38) { + var shiftPressed = lz.Keys.isKeyDown("shift"); + this.doHandlerUpdates = true; + this.setAttribute("y",this.y-(shiftPressed ? 20 : 2)); + this.doHandlerUpdates = false; + this.objRef.parent.UpdateByObject(this.objRef); this.setStartValues(); - } else if (key == 39) { - var shiftPressed = lz.Keys.isKeyDown("shift"); - this.doHandlerUpdates = true; - this.setAttribute("x",this.x+(shiftPressed ? 20 : 2)); - this.doHandlerUpdates = false; - this.objRef.parent.UpdateByObject(this.objRef); + } else if (key == 39) { + var shiftPressed = lz.Keys.isKeyDown("shift"); + this.doHandlerUpdates = true; + this.setAttribute("x",this.x+(shiftPressed ? 20 : 2)); + this.doHandlerUpdates = false; + this.objRef.parent.UpdateByObject(this.objRef); this.setStartValues(); - } else if (key == 37) { - var shiftPressed = lz.Keys.isKeyDown("shift"); - this.doHandlerUpdates = true; - this.setAttribute("x",this.x-(shiftPressed ? 20 : 2)); - this.doHandlerUpdates = false; - this.objRef.parent.UpdateByObject(this.objRef); + } else if (key == 37) { + var shiftPressed = lz.Keys.isKeyDown("shift"); + this.doHandlerUpdates = true; + this.setAttribute("x",this.x-(shiftPressed ? 20 : 2)); + this.doHandlerUpdates = false; + this.objRef.parent.UpdateByObject(this.objRef); this.setStartValues(); - } - </handler> - + } + </handler> + <method name="setStartValues"> this.startdragX = this.x; this.startdragY = this.y; this.startdragWidth = this.width; - this.startdragHeight = this.height; + this.startdragHeight = this.height; </method> - <method name="_applyResizestateFromThis"> - lz.Focus.setFocus(this, true); - if ($debug) Debug.write("Apply resize State"); - if (!this.canBeResized) { - return; - } - this.setStartValues(); + <method name="_applyResizestateFromThis"> + lz.Focus.setFocus(this, true); + if ($debug) Debug.write("Apply resize State"); + if (!this.canBeResized) { + return; + } + this.setStartValues(); this.rs.apply() </method> - - <method name="_removeResizestateFromThis"> - <![CDATA[ + + <method name="_removeResizestateFromThis"> + <![CDATA[ if (!this.canBeResized) { - return; - } - this.rs.remove(); + return; + } + this.rs.remove(); if (this.startdragX != this.x || this.startdragY != this.y || this.startdragWidth != this.width || this.startdragHeight != this.height){ //Debug.write("value changed 1"); @@ -349,10 +343,9 @@ this.setStartValues(); } if (parent.onBoundingBox) parent.onBoundingBox.sendEvent(this); - - ]]> - </method> - + ]]> + </method> + <method name="_applyDragstateFromThis"> lz.Focus.setFocus(this, true); if (!this.canBeDragged) { @@ -360,73 +353,71 @@ } this.setStartValues(); this.dragger.apply() - </method> - - <method name="_removeDragstateFromThis"> - <![CDATA[ + </method> + + <method name="_removeDragstateFromThis"> + <![CDATA[ if (!this.canBeDragged) { - return; - } - this.dragger.remove(); + return; + } + this.dragger.remove(); - if (this.startdragX != this.x || this.startdragY != this.y || this.startdragWidth != this.width || this.startdragHeight != this.height){ + if (this.startdragX != this.x || this.startdragY != this.y || this.startdragWidth != this.width || this.startdragHeight != this.height){ //Debug.write("value changed 2"); this.objRef.parent.UpdateByObject(this.objRef); this.setStartValues(); } if (parent.onBoundingBox) parent.onBoundingBox.sendEvent(this); - - ]]> - </method> + ]]> + </method> + + <method name="doSetInnerObjectsBounds" args="w,h"> + this._inner._inner.setAttribute('width',w); + this._inner._inner.setAttribute('height',h); + </method> - <method name="doSetInnerObjectsBounds" args="w,h"> - this._inner._inner.setAttribute('width',w); - this._inner._inner.setAttribute('height',h); - </method> - - <method name="applyScrollbarToObject"> - <![CDATA[ - //if ($debug) Debug.write("-- applyScrollbarToObject --",this.objRef.typeOfObject); - if (this.objRef.typeOfObject == 'swf'){ - if (canvas.ismoderator || canvas.isAllowedToDraw) { - //if ($debug) Debug.write("-- setCurrentMouseWheelObject --",this.objRef._scrollstv); - //setCurrentMouseWheelObject(this.objRef._scrollstv); - } - } - ]]> - </method> - - <method name="removeScrollbarToObject"> - if (this.objRef.typeOfObject == 'swf'){ - //Well disable, you can always disable without any problem - //and in case you do exactly switch the moderation now - //it will remove it in any case - disableCurrentMouseWheelObject(); - } - </method> - - <resizestatemin name="rs"> - <text x="2" y="2" text="${ 'w: '+parent.width+' h: '+parent.height }" bgcolor="white"/> - </resizestatemin> - - <dragstate name="dragger"> + <method name="applyScrollbarToObject"> + <![CDATA[ + //if ($debug) Debug.write("-- applyScrollbarToObject --",this.objRef.typeOfObject); + if (this.objRef.typeOfObject == 'swf'){ + if (canvas.ismoderator || canvas.isAllowedToDraw) { + //if ($debug) Debug.write("-- setCurrentMouseWheelObject --",this.objRef._scrollstv); + //setCurrentMouseWheelObject(this.objRef._scrollstv); + } + } + ]]> + </method> + + <method name="removeScrollbarToObject"> + if (this.objRef.typeOfObject == 'swf'){ + //Well disable, you can always disable without any problem + //and in case you do exactly switch the moderation now + //it will remove it in any case + disableCurrentMouseWheelObject(); + } + </method> + + <resizestatemin name="rs"> + <text x="2" y="2" text="${ 'w: '+parent.width+' h: '+parent.height }" bgcolor="white"/> + </resizestatemin> + + <dragstate name="dragger"> <text x="2" y="2" text="${ 'x: '+parent.getAttributeRelative('x',parent.objRef)+' y: '+parent.getAttributeRelative('y',parent.objRef) }" bgcolor="white"/> - </dragstate> - + </dragstate> + <view name="_innerDrag" width="${ parent.width-parent.innerInsetScrollbars }" - height="${ parent.height-parent.innerInsetScrollbars }" - onmouseover="parent.applyScrollbarToObject()" - onmouseout="parent.removeScrollbarToObject()" - onmousedown="parent._applyDragstateFromThis()" - onmouseup="parent._removeDragstateFromThis()"> - - <contextmenu> - <contextmenuitem caption="$once{ canvas.getLabelName(80) }" - onselect="parent.parent.parent.__LZRemoveItem()" /> - </contextmenu> - - <handler name="ondblclick"> + height="${ parent.height-parent.innerInsetScrollbars }" + onmouseover="parent.applyScrollbarToObject()" + onmouseout="parent.removeScrollbarToObject()" + onmousedown="parent._applyDragstateFromThis()" + onmouseup="parent._removeDragstateFromThis()"> + + <contextmenu> + <contextmenuitem caption="$once{ canvas.getLabelName(80) }" + onselect="parent.parent.parent.__LZRemoveItem()" /> + </contextmenu> + <handler name="ondblclick"> //Debug.write("ondblclick: ",this.parent.objRef.typeOfObject); if (this.parent.objRef.typeOfObject == "text") { var x = this.parent.objRef.x; //this.parent.objRef.getAttributeRelative('x', canvas); @@ -440,22 +431,20 @@ this.parent.objRef.height); } </handler> - + <handler name="onmouseover"> if (this.parent.objRef.typeOfObject != "swf") { - lz.Cursor.setCursorGlobal("arrow_draw_panel_cursor"); + lz.Cursor.setCursorGlobal("arrow_draw_panel_cursor"); } </handler> - + <handler name="onmouseout"> lz.Cursor.unlock(); </handler> - - </view> - + <omImage src="$once{ canvas.getThemeImage('bounding_box_textedit_item_rsc') }" y="2" width="16" height="16" stretches="both" - name="_editText" visibility="hidden" x="${ parent.width-this.width-parent.innerInsetScrollbars-18 }" > + name="_editText" visibility="hidden" x="${ parent.width-this.width-parent.innerInsetScrollbars-18 }" > <handler name="onclick"> this.parent.whiteboardRef .editTextByValues(this.parent.objRef, @@ -467,53 +456,51 @@ this.parent.objRef.height); </handler> <handler name="onmouseover"> - lz.Cursor.restoreCursor(); - lz.Cursor.showHandCursor(true); - </handler> - <handler name="onmouseout"> - lz.Cursor.showHandCursor(false); - lz.Cursor.unlock(); - </handler> - + lz.Cursor.restoreCursor(); + lz.Cursor.showHandCursor(true); + </handler> + <handler name="onmouseout"> + lz.Cursor.showHandCursor(false); + lz.Cursor.unlock(); + </handler> + <labelTooltip labelid="1463" /> - </omImage> - + </omImage> + <omImage src="$once{ canvas.getThemeImage('bounding_box_delete_item_rsc') }" y="2" width="16" height="16" - x="${ parent.width-this.width-parent.innerInsetScrollbars-2 }" stretches="both"> + x="${ parent.width-this.width-parent.innerInsetScrollbars-2 }" stretches="both"> <handler name="onclick"> //Debug.write("this.parent.objRef.name: ",this.parent.objRef.name); //this.parent.whiteboardRef.deleteItemByName(this.parent.objRef.name); parent.__LZRemoveItem(this.parent.objRef); </handler> <handler name="onmouseover"> - lz.Cursor.restoreCursor(); - lz.Cursor.showHandCursor(true); - </handler> - <handler name="onmouseout"> - lz.Cursor.showHandCursor(false); - lz.Cursor.unlock(); - </handler> - + lz.Cursor.restoreCursor(); + lz.Cursor.showHandCursor(true); + </handler> + <handler name="onmouseout"> + lz.Cursor.showHandCursor(false); + lz.Cursor.unlock(); + </handler> + <labelTooltip labelid="80" /> - </omImage> - - <view resource="_boundingBoxPointerTL" x="0" y="0" /> - <view resource="_boundingBoxPointerTR" x="${ parent.width-this.width }" y="0" /> - <view name="_gripperResize" visibility="visible" - resource="_boundingBoxPointerUR" x="${ parent.width-this.width }" y="${ parent.height-this.height }" - onmousedown="parent._applyResizestateFromThis()" onmouseup="parent._removeResizestateFromThis()" > - <handler name="onmouseover"> - lz.Cursor.setCursorGlobal("arrow_resize_panel_cursor"); - </handler> - <handler name="onmouseout"> - lz.Cursor.unlock(); - </handler> - <labelTooltip labelid="252" /> - </view> - <view name="_gripperNoResize" visibility="hidden" - resource="_boundingBoxPointerURNoGripper" x="${ parent.width-this.width }" y="${ parent.height-this.height }" /> - <view resource="_boundingBoxPointerUL" x="0" y="${ parent.height-this.height }" /> + </omImage> + <view resource="_boundingBoxPointerTL" x="0" y="0" /> + <view resource="_boundingBoxPointerTR" x="${ parent.width-this.width }" y="0" /> + <view name="_gripperResize" visibility="visible" + resource="_boundingBoxPointerUR" x="${ parent.width-this.width }" y="${ parent.height-this.height }" + onmousedown="parent._applyResizestateFromThis()" onmouseup="parent._removeResizestateFromThis()" > + <handler name="onmouseover"> + lz.Cursor.setCursorGlobal("arrow_resize_panel_cursor"); + </handler> + <handler name="onmouseout"> + lz.Cursor.unlock(); + </handler> + <labelTooltip labelid="252" /> + </view> + <view name="_gripperNoResize" visibility="hidden" + resource="_boundingBoxPointerURNoGripper" x="${ parent.width-this.width }" y="${ parent.height-this.height }" /> + <view resource="_boundingBoxPointerUL" x="0" y="${ parent.height-this.height }" /> </class> - </library>
Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/panels/propertypanel/propertyPanel.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/panels/propertypanel/propertyPanel.lzx?rev=1773334&r1=1773333&r2=1773334&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/panels/propertypanel/propertyPanel.lzx (original) +++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/panels/propertypanel/propertyPanel.lzx Fri Dec 9 08:26:19 2016 @@ -259,18 +259,18 @@ </handler> <method name="addCurrentObject" args="itemObj"> - //if ($debug) Debug.write("addCurrentObject ",itemObj.fileName,itemObj.name); var docName = itemObj.standardFileName; + //if ($debug) Debug.write("addCurrentObject ", docName, itemObj.fileName, itemObj.name); if (docName.length == 0) { docName = itemObj.fileName; } - parent.currentDocument.addItem(docName,itemObj.name); + parent.currentDocument.addItem(docName, itemObj.name); parent.currentDocument.sendSelection = false; parent.currentDocument.selectItem(itemObj.name); parent.currentDocument.sendSelection = true; - parent._clickLayer.setAttribute("visibility","hidden"); + parent._clickLayer.setAttribute("visible", false); </method> <method name="removeDocument" args="refItemName"> Modified: openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardBarMenu.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardBarMenu.lzx?rev=1773334&r1=1773333&r2=1773334&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardBarMenu.lzx (original) +++ openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/whiteboardBarMenu.lzx Fri Dec 9 08:26:19 2016 @@ -32,30 +32,33 @@ <method name="removeObjectSynced" args="btn"> <![CDATA[ - var removeCurrent = this.currentBtn == btn; - btn.objRef.destroy(); - btn.destroy(); + var _btn = this[btn.name]; + var removeCurrent = this.currentBtn == _btn; + _btn.objRef.destroy(); + _btn.destroy(); if (this.subviews.length != 0 && removeCurrent) { - this.sendActiveWindowSynced(this.subviews[this.subviews.length-1]); + sendActiveWindowSynced(this.subviews[this.subviews.length-1]); + canvas._drawarea = currentBtn.objRef._drawareaMask._drawarea; } ]]> </method> <method name="sendActiveWindow" args="btn,win"> - if ($debug) Debug.write("sendActiveWindow: ",btn,win); + //if ($debug) Debug.write("sendActiveWindow: ", btn, win); this.sendActiveWindowSynced(btn); this.currentBtn.objRef.sendActiveWindow(); </method> <method name="sendActiveWindowSynced" args="btn"> <![CDATA[ - if (this.currentBtn != null){ - this.currentBtn.setActive(false); + if (!!currentBtn && !!currentBtn.objRef) { + currentBtn.setActive(false); + currentBtn.objRef.setAttribute("visible", false); } - this.currentBtn = btn; - this.currentBtn.objRef.setAttribute("visibility","visible"); - this.currentBtn.objRef.bringToFront(); - this.currentBtn.setActive(true); + currentBtn = this[btn.name]; + currentBtn.setActive(true); + currentBtn.objRef.setAttribute("visible", true); + currentBtn.objRef.bringToFront(); ]]> </method> </class> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/components/lps/colorpicker.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/components/lps/colorpicker.lzx?rev=1773334&r1=1773333&r2=1773334&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/components/lps/colorpicker.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/components/lps/colorpicker.lzx Fri Dec 9 08:26:19 2016 @@ -9,7 +9,7 @@ with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -19,330 +19,317 @@ --> <!--- - changed by swagner + changed by swagner --> <library> - - + <class name="colorSlider" extends="slider" x="4" - minvalue="1" maxvalue="240" - trackheight="4" thumbheight="12" - showrange="false" showvalue="true"> - <attribute name="doSendValueEvent" value="false" type="boolean" /> - <handler name="onvalue"> - if (this.doSendValueEvent) { - classroot.updateColor(); - } else { - this.doSendValueEvent=true; - } - </handler> -</class> + minvalue="1" maxvalue="240" + trackheight="4" thumbheight="12" + showrange="false" showvalue="true"> + <attribute name="doSendValueEvent" value="false" type="boolean" /> + <handler name="onvalue"> + if (this.doSendValueEvent) { + classroot.updateColor(); + } else { + this.doSendValueEvent=true; + } + </handler> +</class> <class name="colorPot" width="13" height="13" onmouseout=""> - <attribute name="mycolor" type="color" value="0x000000"/> - <attribute name="mycolorString" type="string" value="0x000000"/> - <attribute name="listener" type="expression"/> - <handler name="onmouseover"> - this.setAttribute('mycolorString',this.parent.parent.parent.numberToRGB(this.mycolor)); - </handler> - <handler name="onclick"> - listener.changeColor(this.mycolor); - listener.close(); - </handler> - <handler name="ondblclick"> - listener.changeColor(this.mycolor); - listener.close(); - </handler> - <labelTooltip text="${ parent.mycolorString }" /> - <view bgcolor="#444444" width="13" height="13" > - <view bgcolor="${classroot.mycolor}" x="1" y="1" width="11" height="11"/> - </view> + <attribute name="mycolor" type="color" value="0x000000"/> + <attribute name="mycolorString" type="string" value="0x000000"/> + <attribute name="listener" type="expression"/> + <handler name="onmouseover"> + this.setAttribute('mycolorString',this.parent.parent.parent.numberToRGB(this.mycolor)); + </handler> + <handler name="onclick"> + listener.changeColor(this.mycolor); + listener.close(); + </handler> + <handler name="ondblclick"> + listener.changeColor(this.mycolor); + listener.close(); + </handler> + <labelTooltip text="${ parent.mycolorString }" /> + <view bgcolor="#444444" width="13" height="13" > + <view bgcolor="${classroot.mycolor}" x="1" y="1" width="11" height="11"/> + </view> </class> - + <class name="colorRow" layout="axis:x;spacing:-1" /> - + <class name="colorpicker" extends="guiPresenter" labelid="425" isdragable="false" - minimizable="false" maximizable="false" fullToolBar="true" - resizeable="false" width="250" height="154" > - - <attribute name="btnRef" value="null" /> - - <attribute name="selectedColor" type="number" value="0x00aeef"/> - - <handler name="onclose"> - lz.ModeManager.release(this); - this.btnRef.closedColorPicker(); - this.btnRef.setAttribute('selectedColor', this.selectedColor); - this.btnRef.setTransformedStringColor(); - </handler> - - <!--- @keywords private --> - <method name="passModeEvent" args="eventStr,view" > - <![CDATA[ - if ( eventStr == "onmousedown" ){ - if ( view != null ) { - if ( !view.childOf(this) ) { - this.close(); - } - } else { - this.close(); - } - } - if (view && view.childOf(this)) { - if (view[ eventStr ]) { - view[ eventStr ].sendEvent( view ); - } - return false; - } - return true; - ]]> - </method> - - <method name="doDefaultColor" args="c"> - <![CDATA[ - var r = (c >> 16) & 0xff; - var g = (c >> 8) & 0xff; - var b = c & 0xff; - ////Debug.write("r g b: ",r,g,b); - var hsl = RGBtoHLS(r,g,b); - ////Debug.write("doDefaultColor ",hsl); - this.updateSlidersByValue(hsl); - var rgb = HLStoRGB(s_hue.value, s_bri.value, s_sat.value); - var c = rgb.r << 16 | rgb.g << 8 | rgb.b - this.setAttribute('selectedColor', c); - ]]> - </method> - - <method name="updateColor" > - <![CDATA[ - ////Debug.write("updateColor "); - var rgb = HLStoRGB(s_hue.value, s_bri.value, s_sat.value); - var c = rgb.r << 16 | rgb.g << 8 | rgb.b - this.setAttribute('selectedColor', c); - - ]]> - </method> - - <method name="changeColor" args="c"> - <![CDATA[ - ////Debug.write("changeColor "); - this.setAttribute('selectedColor', c); - var r = (c >> 16) & 0xff; - var g = (c >> 8) & 0xff; - var b = c & 0xff; - var hsl = RGBtoHLS(r,g,b); - this.updateSlidersByValue(hsl); - ]]> - </method> - - <method name="updateSlidersByValue" args="hsl"> - s_hue.doSendValueEvent=false; - s_hue.setValue(hsl.h); - s_bri.doSendValueEvent=false; - s_bri.setValue(hsl.l); - s_sat.doSendValueEvent=false; - s_sat.setValue(hsl.s); - </method> - - <method name="numberToRGB" args="thisC"> - <![CDATA[ - var c = thisC.getRGB(); - var r = (c >> 16) & 0xff; - var g = (c >> 8) & 0xff; - var b = c & 0xff; - ////Debug.write("r g b: ",r,g,b); - - var HEX_R = r.toString(16).toUpperCase(); - var HEX_G = g.toString(16).toUpperCase(); - var HEX_B = b.toString(16).toUpperCase(); - - if (HEX_R.length < 2) { - HEX_R = "0"+HEX_R; - } - if (HEX_G.length < 2) { - HEX_G = "0"+HEX_G; - } - if (HEX_B.length < 2) { - HEX_B = "0"+HEX_B; - } - var hex = "0x"+HEX_R + HEX_G + HEX_B; - - return hex; - ]]> - </method> - - <method name="RGBtoHLS" args="r,g,b"> - <![CDATA[ - var h,l,s; - var max = (Math.max(Math.max(r, g), b))/255; - var min = (Math.min(Math.min(r, g), b))/255; - var delta = max-min; - l = (max+min)/2; - s = (max == min) ? 0 : ((l <= 0.5) ? delta/l/2 : delta/(2-l*2)); - if(r/255 == max) h = (g-b)/delta/255; - else if(g/255 == max) h = 2+(b-r)/delta/255; - else if(b/255 == max) h = 4+(r-g)/delta/255; - h *= 40; - if(h < 0) h += 240; - h = Math.round(h); - return {h:((isNaN(h)) ? 0 : h), l:Math.round(l*240), s:Math.round(s*240)}; - ]]> - </method> - - <method name="HLStoRGB" args="h,l,s"> - <![CDATA[ - var r,g,b; - if(s == 0) { - r = g = b = Math.round(l/240*255); - } else { - h /= 240; l /= 240; s /= 240; - var temp4,temp3; - var temp2 = (l < 0.5) ? l*(s+1) : l+s-l*s; - var temp1 = l*2 - temp2; - for(var i=0; i<3; i++) { - switch(i) { - case 0: temp3 = h+1/3; break; - case 1: temp3 = h; break; - case 2: temp3 = h-1/3; break; - } - if(temp3 < 0) temp3++; - else if(temp3 > 1) temp3--; - if(temp3*6 < 1) temp4 = temp1+(temp2-temp1)*6*temp3; - else if(temp3*2 < 1) temp4 = temp2; - else if(temp3*3 < 2) temp4 = temp1+(temp2-temp1)*((2/3)-temp3)*6; - else temp4 = temp1; - switch(i) { - case 0: r = Math.round(temp4*255); break; - case 1: g = Math.round(temp4*255); break; - case 2: b = Math.round(temp4*255); break; - } - } - } - return {r:r, g:g, b:b}; - ]]> - </method> - - - <text fontsize="8" x="$once{classroot.s_hue.width + classroot.s_hue.x}" - y="$once{classroot.s_hue.y - 4}" text="HUE" width="26"/> - - <colorSlider name="s_hue" y="102" /> - - <text fontsize="8" x="$once{classroot.s_bri.width + classroot.s_bri.x}" - y="$once{classroot.s_bri.y - 4}" text="BRI" /> - - <colorSlider name="s_bri" y="120" /> - - <text fontsize="8" x="$once{classroot.s_sat.width + classroot.s_sat.x}" - y="$once{classroot.s_sat.y - 4}" text="SAT" /> - - <colorSlider name="s_sat" y="138" /> - - - <!-- current color --> - <view name="c2" bgcolor="black" width="30" height="66" y="24" x="206"> - <view name="current" x="1" y="1" bgcolor="${classroot.selectedColor}" - width="$once{parent.width -2}" height="$once{parent.height -2}" /> - </view> - - <!-- default colors --> - <view x="4" y="26" layout="axis:y;spacing:-1" > - - <colorRow> - <colorPot listener="$once{classroot}" mycolor="#ff0000" mycolorString="0xFF0000" /> - <colorPot listener="$once{classroot}" mycolor="#ffff00" mycolorString="0xFFFF00" /> - <colorPot listener="$once{classroot}" mycolor="#00ff00" mycolorString="0x00FF00" /> - <colorPot listener="$once{classroot}" mycolor="#00ffff" mycolorString="0x00FFFF" /> - <colorPot listener="$once{classroot}" mycolor="#0000ff" mycolorString="0x0000FF" /> - <colorPot listener="$once{classroot}" mycolor="#ff00ff" mycolorString="0xFF00Ff" /> - <colorPot listener="$once{classroot}" mycolor="#ffffff" mycolorString="0xFFFFFF" /> - <colorPot listener="$once{classroot}" mycolor="#ebebeb" mycolorString="0xEBEBEB" /> - <colorPot listener="$once{classroot}" mycolor="#e1e1e1" mycolorString="0xE1E1E1" /> - <colorPot listener="$once{classroot}" mycolor="#d7d7d7" mycolorString="0xD7D7D7" /> - <colorPot listener="$once{classroot}" mycolor="#cccccc" mycolorString="0xCCCCCC" /> - <colorPot listener="$once{classroot}" mycolor="#c2c2c2" mycolorString="0xC2C2C2" /> - <colorPot listener="$once{classroot}" mycolor="#b7b7b7" mycolorString="0xB7B7B7" /> - <colorPot listener="$once{classroot}" mycolor="#acacac" mycolorString="0xACACAC" /> - <colorPot listener="$once{classroot}" mycolor="#a0a0a0" mycolorString="0xA0A0A0" /> - <colorPot listener="$once{classroot}" mycolor="#959595" mycolorString="0x959595" /> - </colorRow> - <colorRow> - <colorPot listener="$once{classroot}" mycolor="#ee1d24" mycolorString="0xEE1D24" /> - <colorPot listener="$once{classroot}" mycolor="#fff100" mycolorString="0xFFF100" /> - <colorPot listener="$once{classroot}" mycolor="#00a650" mycolorString="0x00A650" /> - <colorPot listener="$once{classroot}" mycolor="#00aeef" mycolorString="0x00AEEF" /> - <colorPot listener="$once{classroot}" mycolor="#2f3192" mycolorString="0x2F3192" /> - <colorPot listener="$once{classroot}" mycolor="#ed008c" mycolorString="0xED008C" /> - <colorPot listener="$once{classroot}" mycolor="#898989" mycolorString="0x898989" /> - <colorPot listener="$once{classroot}" mycolor="#7d7d7d" mycolorString="0x7D7D7D" /> - <colorPot listener="$once{classroot}" mycolor="#707070" mycolorString="0x707070" /> - <colorPot listener="$once{classroot}" mycolor="#626262" mycolorString="0x626262" /> - <colorPot listener="$once{classroot}" mycolor="#555555" mycolorString="0x555555" /> - <colorPot listener="$once{classroot}" mycolor="#464646" mycolorString="0x464646" /> - <colorPot listener="$once{classroot}" mycolor="#363636" mycolorString="0x363636" /> - <colorPot listener="$once{classroot}" mycolor="#262626" mycolorString="0x262626" /> - <colorPot listener="$once{classroot}" mycolor="#111111" mycolorString="0x111111" /> - <colorPot listener="$once{classroot}" mycolor="#000000" mycolorString="0x000000" /> - </colorRow> - - <colorRow> - <colorPot listener="$once{classroot}" mycolor="#f7977a" mycolorString="0xF7977A" /> - <colorPot listener="$once{classroot}" mycolor="#fbad82" mycolorString="0xFBAD82" /> - <colorPot listener="$once{classroot}" mycolor="#fdc68c" mycolorString="0xFDC68C" /> - <colorPot listener="$once{classroot}" mycolor="#fff799" mycolorString="0xFFF799" /> - <colorPot listener="$once{classroot}" mycolor="#c6df9c" mycolorString="0xC6DF9C" /> - <colorPot listener="$once{classroot}" mycolor="#a4d49d" mycolorString="0xA4D49D" /> - <colorPot listener="$once{classroot}" mycolor="#81ca9d" mycolorString="0x81CA9D" /> - <colorPot listener="$once{classroot}" mycolor="#7bcdc9" mycolorString="0x7bcdc9" /> - <colorPot listener="$once{classroot}" mycolor="#6ccff7" mycolorString="0x6CCFF7" /> - <colorPot listener="$once{classroot}" mycolor="#7ca6d8" mycolorString="0x7CA6D8" /> - <colorPot listener="$once{classroot}" mycolor="#8293ca" mycolorString="0x8293CA" /> - <colorPot listener="$once{classroot}" mycolor="#8881be" mycolorString="0x8881BE" /> - <colorPot listener="$once{classroot}" mycolor="#a286bd" mycolorString="0xA286BD" /> - <colorPot listener="$once{classroot}" mycolor="#bc8cbf" mycolorString="0xBC8CBf" /> - <colorPot listener="$once{classroot}" mycolor="#f49bc1" mycolorString="0xF49BC1" /> - <colorPot listener="$once{classroot}" mycolor="#f5999d" mycolorString="0xf5999d" /> - </colorRow> - - <colorRow> - <colorPot listener="$once{classroot}" mycolor="#f16c4d" mycolorString="0xF16C4D" /> - <colorPot listener="$once{classroot}" mycolor="#f68e54" mycolorString="0xF68E54" /> - <colorPot listener="$once{classroot}" mycolor="#fbaf5a" mycolorString="0xFBAF5A" /> - <colorPot listener="$once{classroot}" mycolor="#fff467" mycolorString="0xFFF467" /> - <colorPot listener="$once{classroot}" mycolor="#acd372" mycolorString="0xACD372" /> - <colorPot listener="$once{classroot}" mycolor="#7dc473" mycolorString="0x7DC473" /> - <colorPot listener="$once{classroot}" mycolor="#39b778" mycolorString="0x39B778" /> - <colorPot listener="$once{classroot}" mycolor="#16bcb4" mycolorString="0x16BCB4" /> - <colorPot listener="$once{classroot}" mycolor="#00bff3" mycolorString="0x00BFF3" /> - <colorPot listener="$once{classroot}" mycolor="#438ccb" mycolorString="0x438CCB" /> - <colorPot listener="$once{classroot}" mycolor="#5573b7" mycolorString="0x5573B7" /> - <colorPot listener="$once{classroot}" mycolor="#5e5ca7" mycolorString="0x5E5CA7" /> - <colorPot listener="$once{classroot}" mycolor="#855FA8" mycolorString="0x855FA8" /> - <colorPot listener="$once{classroot}" mycolor="#a763a9" mycolorString="0xA763A9" /> - <colorPot listener="$once{classroot}" mycolor="#ef6ea8" mycolorString="0xEf6EA8" /> - <colorPot listener="$once{classroot}" mycolor="#f16d7e" mycolorString="0xF16D7E" /> - </colorRow> - - - <colorRow> - <colorPot listener="$once{classroot}" mycolor="#9a8575" mycolorString="0x9A8575" /> - <colorPot listener="$once{classroot}" mycolor="#726357" mycolorString="0x726357" /> - <colorPot listener="$once{classroot}" mycolor="#524842" mycolorString="0x524842" /> - <colorPot listener="$once{classroot}" mycolor="#362f2c" mycolorString="0x362F2C" /> - <colorPot listener="$once{classroot}" mycolor="#c69c6d" mycolorString="0xC69C6D" /> - <colorPot listener="$once{classroot}" mycolor="#a77c50" mycolorString="0xA77C50" /> - <colorPot listener="$once{classroot}" mycolor="#8c623a" mycolorString="0x8C623A" /> - <colorPot listener="$once{classroot}" mycolor="#744b24" mycolorString="0x744B24" /> - <colorPot listener="$once{classroot}" mycolor="#613813" mycolorString="0x613813" /> - </colorRow> - - </view> - -</class> + minimizable="false" maximizable="false" fullToolBar="true" + resizeable="false" width="250" height="154" > + <attribute name="btnRef" value="null" /> + <attribute name="selectedColor" type="number" value="0x00aeef"/> + + <handler name="onclose"> + lz.ModeManager.release(this); + this.btnRef.closedColorPicker(); + this.btnRef.setAttribute('selectedColor', this.selectedColor); + this.btnRef.setTransformedStringColor(); + </handler> + + <!--- @keywords private --> + <method name="passModeEvent" args="eventStr,view" > + <![CDATA[ + if ( eventStr == "onmousedown" ){ + if ( view != null ) { + if ( !view.childOf(this) ) { + this.close(); + } + } else { + this.close(); + } + } + if (view && view.childOf(this)) { + if (view[ eventStr ]) { + view[ eventStr ].sendEvent( view ); + } + return false; + } + return true; + ]]> + </method> + + <method name="doDefaultColor" args="c"> + <![CDATA[ + var r = (c >> 16) & 0xff; + var g = (c >> 8) & 0xff; + var b = c & 0xff; + ////Debug.write("r g b: ",r,g,b); + var hsl = RGBtoHLS(r,g,b); + ////Debug.write("doDefaultColor ",hsl); + this.updateSlidersByValue(hsl); + var rgb = HLStoRGB(s_hue.value, s_bri.value, s_sat.value); + var c = rgb.r << 16 | rgb.g << 8 | rgb.b + this.setAttribute('selectedColor', c); + ]]> + </method> + + <method name="updateColor" > + <![CDATA[ + ////Debug.write("updateColor "); + var rgb = HLStoRGB(s_hue.value, s_bri.value, s_sat.value); + var c = rgb.r << 16 | rgb.g << 8 | rgb.b + this.setAttribute('selectedColor', c); + + ]]> + </method> + + <method name="changeColor" args="c"> + <![CDATA[ + ////Debug.write("changeColor "); + this.setAttribute('selectedColor', c); + var r = (c >> 16) & 0xff; + var g = (c >> 8) & 0xff; + var b = c & 0xff; + var hsl = RGBtoHLS(r,g,b); + this.updateSlidersByValue(hsl); + ]]> + </method> + + <method name="updateSlidersByValue" args="hsl"> + s_hue.doSendValueEvent=false; + s_hue.setValue(hsl.h); + s_bri.doSendValueEvent=false; + s_bri.setValue(hsl.l); + s_sat.doSendValueEvent=false; + s_sat.setValue(hsl.s); + </method> + <method name="numberToRGB" args="c"> + <![CDATA[ + //if ($debug) Debug.write("numberToRGB 1", c); + var r = (c >> 16) & 0xff; + var g = (c >> 8) & 0xff; + var b = c & 0xff; + ////Debug.write("r g b: ",r,g,b); + + var HEX_R = r.toString(16).toUpperCase(); + var HEX_G = g.toString(16).toUpperCase(); + var HEX_B = b.toString(16).toUpperCase(); + + if (HEX_R.length < 2) { + HEX_R = "0"+HEX_R; + } + if (HEX_G.length < 2) { + HEX_G = "0"+HEX_G; + } + if (HEX_B.length < 2) { + HEX_B = "0"+HEX_B; + } + var hex = "0x"+HEX_R + HEX_G + HEX_B; + + return hex; + ]]> + </method> + + <method name="RGBtoHLS" args="r,g,b"> + <![CDATA[ + var h,l,s; + var max = (Math.max(Math.max(r, g), b))/255; + var min = (Math.min(Math.min(r, g), b))/255; + var delta = max-min; + l = (max+min)/2; + s = (max == min) ? 0 : ((l <= 0.5) ? delta/l/2 : delta/(2-l*2)); + if(r/255 == max) h = (g-b)/delta/255; + else if(g/255 == max) h = 2+(b-r)/delta/255; + else if(b/255 == max) h = 4+(r-g)/delta/255; + h *= 40; + if(h < 0) h += 240; + h = Math.round(h); + return {h:((isNaN(h)) ? 0 : h), l:Math.round(l*240), s:Math.round(s*240)}; + ]]> + </method> + + <method name="HLStoRGB" args="h,l,s"> + <![CDATA[ + var r,g,b; + if(s == 0) { + r = g = b = Math.round(l/240*255); + } else { + h /= 240; l /= 240; s /= 240; + var temp4,temp3; + var temp2 = (l < 0.5) ? l*(s+1) : l+s-l*s; + var temp1 = l*2 - temp2; + for(var i=0; i<3; i++) { + switch(i) { + case 0: temp3 = h+1/3; break; + case 1: temp3 = h; break; + case 2: temp3 = h-1/3; break; + } + if(temp3 < 0) temp3++; + else if(temp3 > 1) temp3--; + if(temp3*6 < 1) temp4 = temp1+(temp2-temp1)*6*temp3; + else if(temp3*2 < 1) temp4 = temp2; + else if(temp3*3 < 2) temp4 = temp1+(temp2-temp1)*((2/3)-temp3)*6; + else temp4 = temp1; + switch(i) { + case 0: r = Math.round(temp4*255); break; + case 1: g = Math.round(temp4*255); break; + case 2: b = Math.round(temp4*255); break; + } + } + } + return {r:r, g:g, b:b}; + ]]> + </method> + + <text fontsize="8" x="$once{classroot.s_hue.width + classroot.s_hue.x}" + y="$once{classroot.s_hue.y - 4}" text="HUE" width="26"/> + + <colorSlider name="s_hue" y="102" /> + + <text fontsize="8" x="$once{classroot.s_bri.width + classroot.s_bri.x}" + y="$once{classroot.s_bri.y - 4}" text="BRI" /> + + <colorSlider name="s_bri" y="120" /> + + <text fontsize="8" x="$once{classroot.s_sat.width + classroot.s_sat.x}" + y="$once{classroot.s_sat.y - 4}" text="SAT" /> + + <colorSlider name="s_sat" y="138" /> + + <!-- current color --> + <view name="c2" bgcolor="black" width="30" height="66" y="24" x="206"> + <view name="current" x="1" y="1" bgcolor="${classroot.selectedColor}" + width="$once{parent.width -2}" height="$once{parent.height -2}" /> + </view> + + <!-- default colors --> + <view x="4" y="26" layout="axis:y;spacing:-1" > + <colorRow> + <colorPot listener="$once{classroot}" mycolor="#ff0000" mycolorString="0xFF0000" /> + <colorPot listener="$once{classroot}" mycolor="#ffff00" mycolorString="0xFFFF00" /> + <colorPot listener="$once{classroot}" mycolor="#00ff00" mycolorString="0x00FF00" /> + <colorPot listener="$once{classroot}" mycolor="#00ffff" mycolorString="0x00FFFF" /> + <colorPot listener="$once{classroot}" mycolor="#0000ff" mycolorString="0x0000FF" /> + <colorPot listener="$once{classroot}" mycolor="#ff00ff" mycolorString="0xFF00Ff" /> + <colorPot listener="$once{classroot}" mycolor="#ffffff" mycolorString="0xFFFFFF" /> + <colorPot listener="$once{classroot}" mycolor="#ebebeb" mycolorString="0xEBEBEB" /> + <colorPot listener="$once{classroot}" mycolor="#e1e1e1" mycolorString="0xE1E1E1" /> + <colorPot listener="$once{classroot}" mycolor="#d7d7d7" mycolorString="0xD7D7D7" /> + <colorPot listener="$once{classroot}" mycolor="#cccccc" mycolorString="0xCCCCCC" /> + <colorPot listener="$once{classroot}" mycolor="#c2c2c2" mycolorString="0xC2C2C2" /> + <colorPot listener="$once{classroot}" mycolor="#b7b7b7" mycolorString="0xB7B7B7" /> + <colorPot listener="$once{classroot}" mycolor="#acacac" mycolorString="0xACACAC" /> + <colorPot listener="$once{classroot}" mycolor="#a0a0a0" mycolorString="0xA0A0A0" /> + <colorPot listener="$once{classroot}" mycolor="#959595" mycolorString="0x959595" /> + </colorRow> + <colorRow> + <colorPot listener="$once{classroot}" mycolor="#ee1d24" mycolorString="0xEE1D24" /> + <colorPot listener="$once{classroot}" mycolor="#fff100" mycolorString="0xFFF100" /> + <colorPot listener="$once{classroot}" mycolor="#00a650" mycolorString="0x00A650" /> + <colorPot listener="$once{classroot}" mycolor="#00aeef" mycolorString="0x00AEEF" /> + <colorPot listener="$once{classroot}" mycolor="#2f3192" mycolorString="0x2F3192" /> + <colorPot listener="$once{classroot}" mycolor="#ed008c" mycolorString="0xED008C" /> + <colorPot listener="$once{classroot}" mycolor="#898989" mycolorString="0x898989" /> + <colorPot listener="$once{classroot}" mycolor="#7d7d7d" mycolorString="0x7D7D7D" /> + <colorPot listener="$once{classroot}" mycolor="#707070" mycolorString="0x707070" /> + <colorPot listener="$once{classroot}" mycolor="#626262" mycolorString="0x626262" /> + <colorPot listener="$once{classroot}" mycolor="#555555" mycolorString="0x555555" /> + <colorPot listener="$once{classroot}" mycolor="#464646" mycolorString="0x464646" /> + <colorPot listener="$once{classroot}" mycolor="#363636" mycolorString="0x363636" /> + <colorPot listener="$once{classroot}" mycolor="#262626" mycolorString="0x262626" /> + <colorPot listener="$once{classroot}" mycolor="#111111" mycolorString="0x111111" /> + <colorPot listener="$once{classroot}" mycolor="#000000" mycolorString="0x000000" /> + </colorRow> + <colorRow> + <colorPot listener="$once{classroot}" mycolor="#f7977a" mycolorString="0xF7977A" /> + <colorPot listener="$once{classroot}" mycolor="#fbad82" mycolorString="0xFBAD82" /> + <colorPot listener="$once{classroot}" mycolor="#fdc68c" mycolorString="0xFDC68C" /> + <colorPot listener="$once{classroot}" mycolor="#fff799" mycolorString="0xFFF799" /> + <colorPot listener="$once{classroot}" mycolor="#c6df9c" mycolorString="0xC6DF9C" /> + <colorPot listener="$once{classroot}" mycolor="#a4d49d" mycolorString="0xA4D49D" /> + <colorPot listener="$once{classroot}" mycolor="#81ca9d" mycolorString="0x81CA9D" /> + <colorPot listener="$once{classroot}" mycolor="#7bcdc9" mycolorString="0x7bcdc9" /> + <colorPot listener="$once{classroot}" mycolor="#6ccff7" mycolorString="0x6CCFF7" /> + <colorPot listener="$once{classroot}" mycolor="#7ca6d8" mycolorString="0x7CA6D8" /> + <colorPot listener="$once{classroot}" mycolor="#8293ca" mycolorString="0x8293CA" /> + <colorPot listener="$once{classroot}" mycolor="#8881be" mycolorString="0x8881BE" /> + <colorPot listener="$once{classroot}" mycolor="#a286bd" mycolorString="0xA286BD" /> + <colorPot listener="$once{classroot}" mycolor="#bc8cbf" mycolorString="0xBC8CBf" /> + <colorPot listener="$once{classroot}" mycolor="#f49bc1" mycolorString="0xF49BC1" /> + <colorPot listener="$once{classroot}" mycolor="#f5999d" mycolorString="0xf5999d" /> + </colorRow> + <colorRow> + <colorPot listener="$once{classroot}" mycolor="#f16c4d" mycolorString="0xF16C4D" /> + <colorPot listener="$once{classroot}" mycolor="#f68e54" mycolorString="0xF68E54" /> + <colorPot listener="$once{classroot}" mycolor="#fbaf5a" mycolorString="0xFBAF5A" /> + <colorPot listener="$once{classroot}" mycolor="#fff467" mycolorString="0xFFF467" /> + <colorPot listener="$once{classroot}" mycolor="#acd372" mycolorString="0xACD372" /> + <colorPot listener="$once{classroot}" mycolor="#7dc473" mycolorString="0x7DC473" /> + <colorPot listener="$once{classroot}" mycolor="#39b778" mycolorString="0x39B778" /> + <colorPot listener="$once{classroot}" mycolor="#16bcb4" mycolorString="0x16BCB4" /> + <colorPot listener="$once{classroot}" mycolor="#00bff3" mycolorString="0x00BFF3" /> + <colorPot listener="$once{classroot}" mycolor="#438ccb" mycolorString="0x438CCB" /> + <colorPot listener="$once{classroot}" mycolor="#5573b7" mycolorString="0x5573B7" /> + <colorPot listener="$once{classroot}" mycolor="#5e5ca7" mycolorString="0x5E5CA7" /> + <colorPot listener="$once{classroot}" mycolor="#855FA8" mycolorString="0x855FA8" /> + <colorPot listener="$once{classroot}" mycolor="#a763a9" mycolorString="0xA763A9" /> + <colorPot listener="$once{classroot}" mycolor="#ef6ea8" mycolorString="0xEf6EA8" /> + <colorPot listener="$once{classroot}" mycolor="#f16d7e" mycolorString="0xF16D7E" /> + </colorRow> + <colorRow> + <colorPot listener="$once{classroot}" mycolor="#9a8575" mycolorString="0x9A8575" /> + <colorPot listener="$once{classroot}" mycolor="#726357" mycolorString="0x726357" /> + <colorPot listener="$once{classroot}" mycolor="#524842" mycolorString="0x524842" /> + <colorPot listener="$once{classroot}" mycolor="#362f2c" mycolorString="0x362F2C" /> + <colorPot listener="$once{classroot}" mycolor="#c69c6d" mycolorString="0xC69C6D" /> + <colorPot listener="$once{classroot}" mycolor="#a77c50" mycolorString="0xA77C50" /> + <colorPot listener="$once{classroot}" mycolor="#8c623a" mycolorString="0x8C623A" /> + <colorPot listener="$once{classroot}" mycolor="#744b24" mycolorString="0x744B24" /> + <colorPot listener="$once{classroot}" mycolor="#613813" mycolorString="0x613813" /> + </colorRow> + </view> +</class> </library> <!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** -* Copyright 2005-2007 Laszlo Systems, Inc. All Rights Reserved. * -* Use is subject to license terms. * +* Copyright 2005-2007 Laszlo Systems, Inc. All Rights Reserved. * +* Use is subject to license terms. * * X_LZ_COPYRIGHT_END ****************************************************** --> -<!-- @LZX_VERSION@ --> +<!-- @LZX_VERSION@ --> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawImage.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawImage.lzx?rev=1773334&r1=1773333&r2=1773334&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawImage.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawImage.lzx Fri Dec 9 08:26:19 2016 @@ -39,7 +39,7 @@ <!-- invoked by clicking on the confirmation dialog after clicking on an image in the Library --> <method name="addNewSyncImage" args="urlname,posx,posy,baseurl,fileName,moduleName,parentPath,room,domain"> - if ($debug) Debug.write("urlname: ",urlname); + if ($debug) Debug.write("urlname: ", urlname); var now = new Date(); //This invokes a Method which is in the remoteWhiteboard.lzx this.startNewObjectSyncProcess.isStarting = true; @@ -222,7 +222,7 @@ if ($debug) Debug.write(" :: -image- baseactionobjectList.push :: ", this.baseactionobjectList.length, this.baseactionobjectList); if (doCallUpdate) this.onsharedMessage('draw',actionObject); </method> - + <!-- adds the Image to the Layers and throws a onsharedMessage, this can only happen _after_ loading the Image cause you do not know its Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/remoteWhiteboard.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/remoteWhiteboard.lzx?rev=1773334&r1=1773333&r2=1773334&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/remoteWhiteboard.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/remoteWhiteboard.lzx Fri Dec 9 08:26:19 2016 @@ -23,9 +23,8 @@ <class name="remoteWhiteboard" extends="baseDrawSave"> <attribute name="loadingObjectListId" value="0" type="number" /> <attribute name="loadingObjectList" value="null" /> - <attribute name="loadObjectDelegate" value="null" /> - + <method name="loadObjectList" args="whiteBoardObject"> <![CDATA[ if ($debug) Debug.info("loadObjectList :1: ", whiteBoardObject); @@ -72,7 +71,7 @@ } ]]> </method> - + <method name="loadSavedObjectList" args="objList"> <![CDATA[ var tempArray = new Array(); @@ -114,23 +113,19 @@ } ]]> </method> - + <method name="prepareLoadWMLFile" args="itemObj"> if ($debug) Debug.write("loadWMLFile: ",itemObj); - this.loadWMLFile.setAttribute('fileId', itemObj.fileId); - if ($debug) Debug.write("prepareLoadWMLFile 1: ",parent.parent.whiteboardId); - this.loadWMLFile.doCall(); </method> - - + <method name="loadWmlToWhiteboardById" args="roomItems"> this.clearRemote(); this.loadSavedObjectList(roomItems); </method> - + <netRemoteCallHib name="startNewSyncprocess" funcname="whiteboardservice.startNewSyncprocess" remotecontext="$once{ canvas.thishib }" > <handler name="ondata" args="value"> <![CDATA[ @@ -141,10 +136,10 @@ parent.startInitialLoadingProcess(); } ]]> - </handler> - </netRemoteCallHib> - - <netRemoteCallHib name="startSavedSyncprocess" funcname="whiteboardservice.startNewSyncprocess" remotecontext="$once{ canvas.thishib }" > + </handler> + </netRemoteCallHib> + + <netRemoteCallHib name="startSavedSyncprocess" funcname="whiteboardservice.startNewSyncprocess" remotecontext="$once{ canvas.thishib }" > <handler name="ondata" args="value"> <![CDATA[ //The onResult-Handler will be called be the rtmpconnection @@ -152,25 +147,25 @@ if ($debug) Debug.write("currentLoadingItem IS mine"); parent.startInitialLoadingProcess(); ]]> - </handler> - </netRemoteCallHib> - + </handler> + </netRemoteCallHib> + <netRemoteCallHib name="sendCompletedSyncEvent" funcname="whiteboardservice.sendCompletedSyncEvent" remotecontext="$once{ canvas.thishib }" > <handler name="ondata" args="value"> <![CDATA[ //The onResult-Handler will be called be the rtmpconnection if ($debug) Debug.write("sendCompletedSyncEvent: ",value); ]]> - </handler> - </netRemoteCallHib> - + </handler> + </netRemoteCallHib> + <method name="startInitialLoadingProcess"> this.loadObjectDelegate = new LzDelegate(this, "loadRemoteObject"); if (this.loadingObjectList.length != 0){ lz.Timer.addTimer(this.loadObjectDelegate, 250); } </method> - + <method name="loadRemoteObject" args="ref"> <![CDATA[ this.sendRemoteWatchObject(this.loadingObjectList[this.loadingObjectListId]); @@ -185,7 +180,7 @@ } ]]> </method> - + <method name="sendRemoteWatchObject" args="actionObject"> <![CDATA[ if ($debug) Debug.write("[sendRemoteWatchObject]: ",actionObject); @@ -223,10 +218,9 @@ this.baseactionobjectList.push(actionObject); if ($debug) Debug.write(" :: baseactionobjectList.push :: ", this.baseactionobjectList.length, this.baseactionobjectList); - ]]> </method> - + <!-- methods for syncing events --> <netRemoteCallHib name="startNewObjectSyncProcess" funcname="whiteboardservice.startNewObjectSyncProcess" remotecontext="$once{ canvas.thishib }" > <attribute name="isStarting" value="false" type="boolean" /> @@ -239,9 +233,9 @@ //The onResult-Handler will be called be the rtmpconnection if ($debug) Debug.write("startNewImagesSyncprocess: ",value); ]]> - </handler> - </netRemoteCallHib> - + </handler> + </netRemoteCallHib> + <netRemoteCallHib name="sendCompletedObjectSyncEvent" funcname="whiteboardservice.sendCompletedObjectSyncEvent" remotecontext="$once{ canvas.thishib }" > <attribute name="uniqueObjectSyncName" value="" type="string" /> @@ -251,18 +245,13 @@ //The onResult-Handler will be called be the rtmpconnection if ($debug) Debug.write("sendCompletedImagesSyncEvent: ",value); ]]> - </handler> - </netRemoteCallHib> - - + </handler> + </netRemoteCallHib> + <method name="startStreaming" args="messageObj"> new lz.incomingScreenSharing(canvas,{messageObj:messageObj}); </method> - <method name="stopStreaming" args="messageObj"> - </method> - </class> - </library>
