diff --git a/build.js b/build.js index 04c4d0a..47444a8 100644 --- a/build.js +++ b/build.js @@ -19,6 +19,8 @@ function copy_images(){ gulp.src('./images/*.png').pipe(gulp.dest(path.join(BUILDDIR, SLUG))); // Splash images gulp.src('./images/Splash images/*.png').pipe(gulp.dest(path.join(BUILDDIR, SLUG))); + // Logs images + gulp.src('./images/Logs/*.gif').pipe(gulp.dest(path.join(BUILDDIR, SLUG))); } function copy_logs() { diff --git a/css/pixel-editor.scss b/css/pixel-editor.scss index bb7d9e1..ab6da87 100644 --- a/css/pixel-editor.scss +++ b/css/pixel-editor.scss @@ -1610,7 +1610,7 @@ div#pb-options { } #sp-quickstart-container { - left:250px; + left:200px; height:65vh; width:650px; display:inline; @@ -1748,11 +1748,16 @@ div#pb-options { width:350px !important; height:90%; overflow-y: scroll; + overflow-x:hidden; line-height: 1.5; position:absolute; top:40px; right:0px; + img { + width:350px; + } + &::-webkit-scrollbar { background: #232125; width: 0.5em; diff --git a/images/Logs/line-tool.gif b/images/Logs/line-tool.gif new file mode 100644 index 0000000..6a793f0 Binary files /dev/null and b/images/Logs/line-tool.gif differ diff --git a/images/Logs/palette-block.gif b/images/Logs/palette-block.gif new file mode 100644 index 0000000..d42d45d Binary files /dev/null and b/images/Logs/palette-block.gif differ diff --git a/images/Logs/resize-canvas.gif b/images/Logs/resize-canvas.gif new file mode 100644 index 0000000..b0ffb4c Binary files /dev/null and b/images/Logs/resize-canvas.gif differ diff --git a/images/Logs/trim-canvas.gif b/images/Logs/trim-canvas.gif new file mode 100644 index 0000000..60bd3a8 Binary files /dev/null and b/images/Logs/trim-canvas.gif differ diff --git a/js/_logs.js b/js/_logs.js index 10de24f..30ee743 100644 --- a/js/_logs.js +++ b/js/_logs.js @@ -7,6 +7,7 @@ rawFile.onreadystatechange = function () if(rawFile.status === 200 || rawFile.status == 0) { var allText = rawFile.responseText; + document.getElementById("latest-update").innerHTML = allText; } } diff --git a/js/_mouseEvents.js b/js/_mouseEvents.js index ed8bb82..1991064 100644 --- a/js/_mouseEvents.js +++ b/js/_mouseEvents.js @@ -169,7 +169,6 @@ window.addEventListener("mouseup", function (mouseEvent) { }, false); -// TODO: Make it snap to the pixel grid function setPreviewPosition(preview, size){ let toAdd = 0; diff --git a/js/_newPixel.js b/js/_newPixel.js index 6b88c14..22c423f 100644 --- a/js/_newPixel.js +++ b/js/_newPixel.js @@ -201,6 +201,10 @@ function newPixel (width, height, editorMode, fileContent = null) { else { switchMode(false); } + + // Resetting history + undoStates = []; + redoStates = []; } function newFromTemplate(preset, x, y) { diff --git a/js/_paletteBlock.js b/js/_paletteBlock.js index adaf06d..188db9f 100644 --- a/js/_paletteBlock.js +++ b/js/_paletteBlock.js @@ -113,8 +113,6 @@ function pbRemoveColours() { coloursList.removeChild(coloursList.children[startIndex]); } clearBorders(); - - // TODO: make it so that ramps update correctly (change start and end indexes if necessary) } /** Starts selecting a ramp. Saves the data needed to draw the outline. diff --git a/js/_resizeSprite.js b/js/_resizeSprite.js index 06131c7..8de39ff 100644 --- a/js/_resizeSprite.js +++ b/js/_resizeSprite.js @@ -20,6 +20,8 @@ function openResizeSpriteWindow() { // Computing the current ratio currentRatio = layers[0].canvasSize[0] / layers[0].canvasSize[1]; + console.log("Current ratio: " + currentRatio); + // Initializing the input fields data.width = layers[0].canvasSize[0]; data.height = layers[1].canvasSize[1]; @@ -232,7 +234,7 @@ function changedWidthPercentage(event) { console.log("old value: " + oldValue + ", ratio: " + ratio); newHeight = startData.height * ratio; - newHeightPerc = data.widthPercentage / currentRatio; + newHeightPerc = data.widthPercentage; newWidth = startData.width * ratio; if (keepRatio) { @@ -262,7 +264,7 @@ function changedHeightPercentage(event) { ratio = data.heightPercentage / oldValue; newWidth = startData.width * ratio; - newWidthPerc = data.heightPercentage * currentRatio; + newWidthPerc = data.heightPercentage; newHeight = startData.height * ratio; if (keepRatio) { diff --git a/logs/latestLog.html b/logs/latestLog.html index a1bbe4a..1eb16df 100644 --- a/logs/latestLog.html +++ b/logs/latestLog.html @@ -1 +1,76 @@ -