diff --git a/README.md b/README.md
index 2d3f95a..5e2483f 100644
--- a/README.md
+++ b/README.md
@@ -143,6 +143,7 @@ further benchmarking and tweaking.
# TODO / Roadmap
+* Implement layer sorting and opacity
* Layer source and mask must not be stored as Vue observables
* Implement action queue when drawing, only execute drawing on zCanvas.sprite.update()-hook
* Maintain cache for source images at the display destination size (invalidate on window resize / zoom), this prevents processing large images that are never displayed at their full scale
@@ -150,7 +151,5 @@ further benchmarking and tweaking.
* Restored base64 images should be treated as binary once more (see layer-factory)
* Zoom set original size isn't that accurate (check also on mobile views), needs calculateMaxScaling ?
* Unload Blobs when images are no longer used in document (see sprite-factory disposeSprite, keep instance count of usages)
-* Implement layer sorting and opacity
-* Implement layer scaling
* Implement merged layer selection
* Scale logic should move from zoomable-canvas into zCanvas (as handleInteraction needs to transform offsets by zoom ratio, see LayerSprite!)
diff --git a/src/components/options-panel/options-panel.vue b/src/components/options-panel/options-panel.vue
index ddf98fe..8a13921 100644
--- a/src/components/options-panel/options-panel.vue
+++ b/src/components/options-panel/options-panel.vue
@@ -86,6 +86,8 @@ export default {
return () => import( "./tool-options-clone/tool-options-clone" );
case ToolTypes.ROTATE:
return () => import( "./tool-options-rotate/tool-options-rotate" );
+ case ToolTypes.SCALE:
+ return () => import( "./tool-options-scale/tool-options-scale" );
case ToolTypes.MIRROR:
return () => import( "./tool-options-mirror/tool-options-mirror" );
case ToolTypes.TEXT:
diff --git a/src/components/options-panel/tool-options-rotate/messages.json b/src/components/options-panel/tool-options-rotate/messages.json
index 14f0479..a133fdc 100644
--- a/src/components/options-panel/tool-options-rotate/messages.json
+++ b/src/components/options-panel/tool-options-rotate/messages.json
@@ -1,5 +1,6 @@
{
"en-US": {
- "rotation": "Rotation"
+ "rotation": "Rotation",
+ "reset": "Reset"
}
}
diff --git a/src/components/options-panel/tool-options-rotate/tool-options-rotate.vue b/src/components/options-panel/tool-options-rotate/tool-options-rotate.vue
index 83d1fe3..81b9e62 100644
--- a/src/components/options-panel/tool-options-rotate/tool-options-rotate.vue
+++ b/src/components/options-panel/tool-options-rotate/tool-options-rotate.vue
@@ -1,7 +1,7 @@
/**
* The MIT License (MIT)
*
- * Igor Zinken 2020 - https://www.igorski.nl
+ * Igor Zinken 2020-2021 - https://www.igorski.nl
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -29,6 +29,14 @@
:max="max"
:tooltip="'none'"
/>
+
+
+
@@ -82,7 +90,10 @@ export default {
commit();
},
});
- }
+ },
+ reset() {
+ this.rotation = 0;
+ },
},
};
diff --git a/src/components/options-panel/tool-options-scale/messages.json b/src/components/options-panel/tool-options-scale/messages.json
new file mode 100644
index 0000000..62b74de
--- /dev/null
+++ b/src/components/options-panel/tool-options-scale/messages.json
@@ -0,0 +1,6 @@
+{
+ "en-US": {
+ "scale": "Scale",
+ "reset": "Reset"
+ }
+}
diff --git a/src/components/options-panel/tool-options-scale/tool-options-scale.vue b/src/components/options-panel/tool-options-scale/tool-options-scale.vue
new file mode 100644
index 0000000..58134fe
--- /dev/null
+++ b/src/components/options-panel/tool-options-scale/tool-options-scale.vue
@@ -0,0 +1,101 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Igor Zinken 2021 - https://www.igorski.nl
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+