mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
made the max canvas size visible at all times. Made the font smaller
This commit is contained in:
@@ -25,8 +25,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.canvasError {
|
.max-canvas-size {
|
||||||
display: none;
|
color: #b3adb6;
|
||||||
|
margin-top: 0;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#no-palette-button {
|
#no-palette-button {
|
||||||
|
|||||||
@@ -87,14 +87,9 @@ window.onload = function () {
|
|||||||
const maxCanvasSize = 5000;
|
const maxCanvasSize = 5000;
|
||||||
if (e.target.value > maxCanvasSize) {
|
if (e.target.value > maxCanvasSize) {
|
||||||
e.target.value = maxCanvasSize;
|
e.target.value = maxCanvasSize;
|
||||||
// Display a simple error message to inform the user of the canvas size limit
|
|
||||||
let canvasError = document.querySelector('.canvasError')
|
|
||||||
canvasError.style.display = 'block';
|
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
// let canvasWidth = canvasSizeInputs[0]
|
|
||||||
// canvasSizeInputs.addEventListener('size-input', validateInput)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply checkboxes
|
// Apply checkboxes
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div id="preset-menu" class="dropdown-menu"></div>
|
<div id="preset-menu" class="dropdown-menu"></div>
|
||||||
|
|
||||||
<h2>Size</h2>
|
<h2>Size</h2>
|
||||||
<h4 class="canvasError">Max canvas size is 5000px</h4>
|
<h4 class="max-canvas-size">Max canvas size is 5000 x 5000</h4>
|
||||||
<input id="size-width" class="size-input" value="{{#if width}}{{width}}{{else}}64{{/if}}" autocomplete="off" />{{svg "x.svg" width="16" height="16" class="dimentions-x"}}<input id="size-height" class="size-input" value="{{#if height}}{{height}}{{else}}64{{/if}}" autocomplete="off" />
|
<input id="size-width" class="size-input" value="{{#if width}}{{width}}{{else}}64{{/if}}" autocomplete="off" />{{svg "x.svg" width="16" height="16" class="dimentions-x"}}<input id="size-height" class="size-input" value="{{#if height}}{{height}}{{else}}64{{/if}}" autocomplete="off" />
|
||||||
<h2>Palette</h2>
|
<h2>Palette</h2>
|
||||||
<button id="palette-button" class="dropdown-button">Choose a palette...</button>
|
<button id="palette-button" class="dropdown-button">Choose a palette...</button>
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
<h1>New Custom Pixel</h1>
|
<h1>New Custom Pixel</h1>
|
||||||
|
|
||||||
<h2>Size</h2>
|
<h2>Size</h2>
|
||||||
|
<h4 class="max-canvas-size">Max canvas size is 5000 x 5000</h4>
|
||||||
<div class="sp-np-entry">
|
<div class="sp-np-entry">
|
||||||
<h4 class="canvasError">Max canvas size is 5000px</h4>
|
|
||||||
<input id="size-width-splash" value="{{#if width}}{{width}}{{else}}64{{/if}}" autocomplete="off" class="size-input"/>{{svg "x.svg" width="16" height="16" class="dimentions-x"}}<input id="size-height-splash" value="{{#if height}}{{height}}{{else}}64{{/if}}" autocomplete="off" class="size-input"/>
|
<input id="size-width-splash" value="{{#if width}}{{width}}{{else}}64{{/if}}" autocomplete="off" class="size-input"/>{{svg "x.svg" width="16" height="16" class="dimentions-x"}}<input id="size-height-splash" value="{{#if height}}{{height}}{{else}}64{{/if}}" autocomplete="off" class="size-input"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user