diff --git a/README.md b/README.md
index f3ceb08..65920a3 100644
--- a/README.md
+++ b/README.md
@@ -72,7 +72,6 @@ npm run lint
* 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)
* Load/save documents directly from/to Dropbox
-* Load/save selections (into document)
* Implement layer scaling
* Implement rectangular selection
* Implement merged layer selection
diff --git a/src/bitmappery.vue b/src/bitmappery.vue
index b963b80..147f643 100644
--- a/src/bitmappery.vue
+++ b/src/bitmappery.vue
@@ -78,7 +78,7 @@ import store from "./store";
import messages from "./messages.json";
import {
RESIZE_DOCUMENT, SAVE_DOCUMENT, EXPORT_IMAGE, DROPBOX_FILE_SELECTOR,
- ADD_LAYER
+ ADD_LAYER, LOAD_SELECTION, SAVE_SELECTION
} from "@/definitions/modal-windows";
Vue.use( Vuex );
@@ -127,6 +127,10 @@ export default {
return () => import( "@/components/dropbox-file-selector/dropbox-file-selector" );
case ADD_LAYER:
return () => import( "@/components/options-panel/components/add-layer/add-layer" );
+ case LOAD_SELECTION:
+ return () => import( "@/components/selection-menu/load-selection/load-selection" );
+ case SAVE_SELECTION:
+ return () => import( "@/components/selection-menu/save-selection/save-selection" );
}
},
},
diff --git a/src/components/application-menu/application-menu.vue b/src/components/application-menu/application-menu.vue
index be2fa5d..2ed4a7d 100644
--- a/src/components/application-menu/application-menu.vue
+++ b/src/components/application-menu/application-menu.vue
@@ -106,6 +106,20 @@
@click="clearSelection()"
>
+
+
+
+
+
+
@@ -134,7 +148,9 @@
diff --git a/src/components/application-menu/messages.json b/src/components/application-menu/messages.json
index d90a070..93e476f 100644
--- a/src/components/application-menu/messages.json
+++ b/src/components/application-menu/messages.json
@@ -10,6 +10,8 @@
"resizeDocument": "Resize document",
"selection": "Selection",
"deselectAll": "Deselect all",
+ "loadSelection": "Load selection",
+ "saveSelection": "Save selection",
"copySelection": "Copy selection",
"pasteAsNewLayer": "Paste as new layer",
"window": "Window",
diff --git a/src/components/options-panel/options-panel.vue b/src/components/options-panel/options-panel.vue
index 58edcf2..07c4f8b 100644
--- a/src/components/options-panel/options-panel.vue
+++ b/src/components/options-panel/options-panel.vue
@@ -159,6 +159,8 @@ export default {
.close-button {
top: $spacing-small - $spacing-xxsmall;
right: $spacing-xxsmall;
+ width: 36px;
+ height: 29px;
img {
width: $spacing-medium + $spacing-small;
diff --git a/src/components/selection-menu/load-selection/load-selection.vue b/src/components/selection-menu/load-selection/load-selection.vue
new file mode 100644
index 0000000..91b20e0
--- /dev/null
+++ b/src/components/selection-menu/load-selection/load-selection.vue
@@ -0,0 +1,101 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Igor Zinken 2020 - 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.
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/selection-menu/load-selection/messages.json b/src/components/selection-menu/load-selection/messages.json
new file mode 100644
index 0000000..8738d80
--- /dev/null
+++ b/src/components/selection-menu/load-selection/messages.json
@@ -0,0 +1,8 @@
+{
+ "en-US": {
+ "loadSelection": "Load selection",
+ "availableSelections": "Available selections",
+ "load": "Load",
+ "cancel": "Cancel"
+ }
+}
diff --git a/src/components/selection-menu/save-selection/messages.json b/src/components/selection-menu/save-selection/messages.json
new file mode 100644
index 0000000..8179a6a
--- /dev/null
+++ b/src/components/selection-menu/save-selection/messages.json
@@ -0,0 +1,8 @@
+{
+ "en-US": {
+ "saveSelection": "Save selection",
+ "name": "Name",
+ "save": "Save",
+ "cancel": "Cancel"
+ }
+}
diff --git a/src/components/selection-menu/save-selection/save-selection.vue b/src/components/selection-menu/save-selection/save-selection.vue
new file mode 100644
index 0000000..1a10beb
--- /dev/null
+++ b/src/components/selection-menu/save-selection/save-selection.vue
@@ -0,0 +1,95 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Igor Zinken 2020 - 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.
+ */
+
+
+
+
+
+
+