diff --git a/img/btnArrowClose.xcf b/img/btnArrow.xcf similarity index 85% rename from img/btnArrowClose.xcf rename to img/btnArrow.xcf index 87ecf05..ee0f1e9 100644 Binary files a/img/btnArrowClose.xcf and b/img/btnArrow.xcf differ diff --git a/img/btnArrowClose.png b/img/btnArrowClose.png new file mode 100644 index 0000000..aa49395 Binary files /dev/null and b/img/btnArrowClose.png differ diff --git a/img/btnArrowOpen.xcf b/img/btnArrowOpen.xcf deleted file mode 100644 index 6af56ad..0000000 Binary files a/img/btnArrowOpen.xcf and /dev/null differ diff --git a/img/btnEditOpen.xcf b/img/btnEditOpen.xcf new file mode 100644 index 0000000..47d67cc Binary files /dev/null and b/img/btnEditOpen.xcf differ diff --git a/img/btnMove.png b/img/btnMove.png new file mode 100644 index 0000000..c1f9e47 Binary files /dev/null and b/img/btnMove.png differ diff --git a/img/btnMove.xcf b/img/btnMove.xcf new file mode 100644 index 0000000..ae0c344 Binary files /dev/null and b/img/btnMove.xcf differ diff --git a/img/btnRotate.xcf b/img/btnRotate.xcf new file mode 100644 index 0000000..8b3eebb Binary files /dev/null and b/img/btnRotate.xcf differ diff --git a/img/btnZoom.png b/img/btnZoom.png new file mode 100644 index 0000000..20d9f43 Binary files /dev/null and b/img/btnZoom.png differ diff --git a/img/btnZoom.xcf b/img/btnZoom.xcf new file mode 100644 index 0000000..1b88ad3 Binary files /dev/null and b/img/btnZoom.xcf differ diff --git a/js/buttonbehaviors.js b/js/buttonbehaviors.js index 80688a5..12f3e16 100644 --- a/js/buttonbehaviors.js +++ b/js/buttonbehaviors.js @@ -1,8 +1,10 @@ var twistIncrement = Math.PI/1800; -var btnNew, btnPrevious, btnNext, btnOops, btnStop, btnInfo, btnRotate; -var btnSettings, btnWordArt, btnZoom, btnMove, btnUpDown, btnTwist, btnShape, btnEditClosed, btnEditOpen; btnToggleVerticalShapes; -var btnDiv,btnConv,btnStraight,btnSine, buttonGroupAdd, popupWordArt; +var btnNew, btnPrevious, btnNext, btnOops, btnStop, btnInfo; +var btnSettings, btnWordArt; +var btnToggleEdit, buttonGroupEdit, btnZoom, btnMove, btnRotate; +var btnToggleVerticalShapes, btnUpDown, btnTwist, btnShape, btnConv, btnStraight, btnSine, btnDiv; +var buttonGroupAdd, popupWordArt; var state; var prevState; @@ -34,8 +36,8 @@ function initButtonBehavior() { btnTwistRight = $("#btnTwistRight"); btnShape = $("#btnShape"); btnRotate = $("#btnRotate"); - btnEditClosed = $("#btnEditClosed"); - btnEditOpen = $("#btnEditOpen"); + btnToggleEdit = $("#btnToggleEdit"); + buttonGroupEdit = $("#buttonGroupEdit"); btnStraight = $("#btnStraight"); btnDiv = $("#btnDiv"); btnConv = $("#btnConv"); @@ -59,9 +61,7 @@ function initButtonBehavior() { btnTwistRight.on("onButtonHold", onBtnTwistRight); btnShape.on("onButtonClick", onBtnShape); btnRotate.on("onButtonHold", onBtnRotate); - btnEditClosed.on("onButtonClick", onBtnEditClosed); - btnEditOpen.on("onButtonHold", onBtnEditOpen); - btnEditOpen.on("onButtonClick", onBtnEditOpen); + btnToggleEdit.on("onButtonClick", onBtnToggleEdit); btnStraight.on("onButtonClick", onBtnStraight); btnDiv.on("onButtonClick", onBtnDiv); btnConv.on("onButtonClick", onBtnConv); @@ -74,8 +74,6 @@ function initButtonBehavior() { setSketchModified(false); function onBtnToggleVerticalShapes() { - console.log("onBtnToggleVerticalShapes"); - var btnImg; if(buttonGroupVerticalShapes.is(":hidden")) { btnImg = "img/buttons/btnArrowClose.png"; @@ -85,7 +83,6 @@ function initButtonBehavior() { btnToggleVerticalShapes.attr("src",btnImg); buttonGroupVerticalShapes.fadeToggle(BUTTON_GROUP_SHOW_DURATION); - } function onBtnAdd() { @@ -95,29 +92,32 @@ function initButtonBehavior() { function onBtnStraight() { setVerticalShape(verticalShapes.NONE); } - function onBtnDiv() { setVerticalShape(verticalShapes.DIVERGING); } - function onBtnConv() { setVerticalShape(verticalShapes.CONVERGING); } - function onBtnSine() { setVerticalShape(verticalShapes.SINUS); } - function onBtnEditClosed(e,cursor) { - btnEditClosed.hide(); - btnEditOpen.show(); - } - function hitTest(cursor,button,radius) { return distance(cursor.x,cursor.y,button.x,button.y) - - - - -
- - - - -
- - - - + +
+ + +
+ +