mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
fixed history state changing to /app
This commit is contained in:
@@ -106,7 +106,7 @@ function newPixel (width, height, editorMode, fileContent = null) {
|
|||||||
|
|
||||||
//if this palette isnt the one specified in the url, then reset the url
|
//if this palette isnt the one specified in the url, then reset the url
|
||||||
if (!palettes[selectedPalette].specified)
|
if (!palettes[selectedPalette].specified)
|
||||||
history.pushState(null, null, '/pixel-editor/app');
|
history.pushState(null, null, '/pixel-editor');
|
||||||
|
|
||||||
//fill the palette with specified colours
|
//fill the palette with specified colours
|
||||||
createColorPalette(palettes[selectedPalette].colors,true);
|
createColorPalette(palettes[selectedPalette].colors,true);
|
||||||
@@ -114,7 +114,7 @@ function newPixel (width, height, editorMode, fileContent = null) {
|
|||||||
// Otherwise, I just generate 2 semirandom colours
|
// Otherwise, I just generate 2 semirandom colours
|
||||||
else if (fileContent == null) {
|
else if (fileContent == null) {
|
||||||
//this wasn't a specified palette, so reset the url
|
//this wasn't a specified palette, so reset the url
|
||||||
history.pushState(null, null, '/pixel-editor/app');
|
history.pushState(null, null, '/pixel-editor');
|
||||||
|
|
||||||
//generate default colors
|
//generate default colors
|
||||||
var fg = hslToRgb(Math.floor(Math.random()*255), 230,70);
|
var fg = hslToRgb(Math.floor(Math.random()*255), 230,70);
|
||||||
|
|||||||
Reference in New Issue
Block a user