From 1e6f719f50d343c79d1b656c0e7484bbebd3753d Mon Sep 17 00:00:00 2001 From: unsettledgames <47360416+unsettledgames@users.noreply.github.com> Date: Wed, 22 Jul 2020 23:29:27 +0200 Subject: [PATCH] Started resize canvas interface --- js/_resizeCanvas.js | 29 +++++++++++++++++++++++++++++ js/pixel-editor.js | 1 + views/pixel-editor.hbs | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 js/_resizeCanvas.js diff --git a/js/_resizeCanvas.js b/js/_resizeCanvas.js new file mode 100644 index 0000000..16cf7be --- /dev/null +++ b/js/_resizeCanvas.js @@ -0,0 +1,29 @@ +let resizeCanvasContainer = document.getElementById("resize-canvas"); + +function openResizeCanvasWindow() { + showDialogue('resize-canvas'); +} + +// Use a dialogue + // Let the user specify data + // Borders + // Pivot + // Apply the new sizing + // Move the images on the layers to fit what the user actually decided + +// Function to handle dropdown menu for pivots + // Open when clicking on the button + // Save the chosen pivot + // Close the menu + +// Function to retrieve data from the input field + // Store the data in the form into variables + // Call the function to resize the canvases + +// Function to actually resize the canvases + // Save all imageDatas + // Resize the canvases + // Clear the canvases + +// Function to place the imageDatas as specified in the pivot section + // Put the imageDatas in the right position \ No newline at end of file diff --git a/js/pixel-editor.js b/js/pixel-editor.js index 3b05c3e..2ca88a9 100644 --- a/js/pixel-editor.js +++ b/js/pixel-editor.js @@ -44,6 +44,7 @@ //=include _checkerboard.js //=include _layer.js //=include _copyPaste.js +//=include _resizeCanvas.js /**load file**/ //=include _loadImage.js diff --git a/views/pixel-editor.hbs b/views/pixel-editor.hbs index c0898d1..1796897 100644 --- a/views/pixel-editor.hbs +++ b/views/pixel-editor.hbs @@ -52,6 +52,8 @@