Author: sebawagner
Date: Tue Apr 24 17:26:38 2012
New Revision: 1329871
URL: http://svn.apache.org/viewvc?rev=1329871&view=rev
Log:
OPENMEETINGS-222 Enable Keyboard actions to whiteboard (Arrow
Down|Left|Right|Up [+Shift] and Delete) when object is selected
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/tools/baseDrawPaint.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/helper/boundingBoxAll.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/tabButtonMain.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/tools/baseDrawPaint.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/tools/baseDrawPaint.lzx?rev=1329871&r1=1329870&r2=1329871&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/tools/baseDrawPaint.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/tools/baseDrawPaint.lzx
Tue Apr 24 17:26:38 2012
@@ -251,8 +251,7 @@
<method name="paintactionHistory"
args="lastActionObject,parentView">
<![CDATA[
- if ($debug)
- Debug.write("## paintactionHistory",
parentView, " opacity:",
+ if ($debug) Debug.write("## paintactionHistory",
parentView, " opacity:",
lastActionObject[5]);
var tmpCurrentlayer = new lz.drawViewNew(parentView, {
@@ -263,15 +262,22 @@
height :
lastActionObject[lastActionObject.length - 2],
opacity : lastActionObject[5]
});
+
+ if ($debug) ("paintactionHistory 1
",tmpCurrentlayer.x,tmpCurrentlayer.y,tmpCurrentlayer.opacity);
tmpCurrentlayer.fillstyle = lastActionObject[2];
tmpCurrentlayer.lineWidth = lastActionObject[3];
tmpCurrentlayer.strokeStyle = lastActionObject[4];
+
+ if ($debug) ("paintactionHistory 2
",tmpCurrentlayer.fillstyle,tmpCurrentlayer.lineWidth,tmpCurrentlayer.strokeStyle);
- for (var eg = 0; eg < lastActionObject[1].length; eg++)
+ for (var eg = 0; eg < lastActionObject[1].length; eg++)
{
+ if ($debug) ("paintactionHistory 3
",lastActionObject[1][eg][1], lastActionObject[1][eg][2],
+
lastActionObject[1][eg][3], lastActionObject[1][eg][4]);
this.drawlineOnObject(tmpCurrentlayer,
lastActionObject[1][eg][1],
lastActionObject[1][eg][2],
lastActionObject[1][eg][3],
lastActionObject[1][eg][4]);
+ }
//tmpCurrentlayer.setAttribute('stretches','both');
this.doSWFDocumentStatus(tmpCurrentlayer,
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/helper/boundingBoxAll.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/helper/boundingBoxAll.lzx?rev=1329871&r1=1329870&r2=1329871&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/helper/boundingBoxAll.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/helper/boundingBoxAll.lzx
Tue Apr 24 17:26:38 2012
@@ -72,7 +72,7 @@
</class>
-<class name="boundingBoxAll" extends="view" >
+<class name="boundingBoxAll" extends="view" focusable="true">
<!--
<method name="removeIt">
@@ -139,6 +139,8 @@
this.setStartValues();
if ($debug) Debug.write("Update Property Panel Settings
to Object Properties ",this.objRef.name);
+ lz.Focus.setFocus(this, false);
+
//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);
@@ -281,6 +283,45 @@
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);
+ 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);
+ 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);
+ this.setStartValues();
+ }
+ </handler>
<method name="setStartValues">
this.startdragX = this.x;
@@ -290,6 +331,7 @@
</method>
<method name="_applyResizestateFromThis">
+ lz.Focus.setFocus(this, true);
if ($debug) Debug.write("Apply resize State");
if (!this.canBeResized) {
return;
@@ -316,6 +358,7 @@
</method>
<method name="_applyDragstateFromThis">
+ lz.Focus.setFocus(this, true);
if (!this.canBeDragged) {
return;
}
@@ -421,10 +464,10 @@
</handler>
<handler name="onmouseover">
lz.Cursor.restoreCursor();
- lz.Cursor.showHandCursor(false);
+ lz.Cursor.showHandCursor(true);
</handler>
<handler name="onmouseout">
- lz.Cursor.showHandCursor(true);
+ lz.Cursor.showHandCursor(false);
lz.Cursor.unlock();
</handler>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/tabButtonMain.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/tabButtonMain.lzx?rev=1329871&r1=1329870&r2=1329871&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/tabButtonMain.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/dashboard/tabButtonMain.lzx
Tue Apr 24 17:26:38 2012
@@ -20,7 +20,7 @@
-->
<library>
-<class name="tabButtonMain" extends="view"
+<class name="tabButtonMain" extends="view" focusable="true"
width="$once{ (parent.width-2)/2 }" height="36" y="2">
<attribute name="labelid" value="0" type="number" />