Minor changes
This commit is contained in:
@@ -57,6 +57,6 @@ app.on('activate', () => {
|
||||
createWindow()
|
||||
}
|
||||
else{
|
||||
|
||||
app.win.show();
|
||||
}
|
||||
})
|
||||
@@ -19,6 +19,7 @@ body { padding: 5px; font-family: 'input_mono_regular'; -webkit-user-select: non
|
||||
#interface.visible { bottom:20px; opacity: 1 }
|
||||
#interface #menu { opacity: 1; position: absolute; top:0px; transition: all 250ms; z-index: 900}
|
||||
#interface #picker { background:red; position: absolute; line-height: 30px; z-index: 0; width:250px; top:5px; opacity: 0; transition: all 250ms;}
|
||||
#interface #color_path { transition: all 500ms; fill:red; }
|
||||
#interface.picker #menu { opacity: 0; top:-5px; z-index: 0 }
|
||||
#interface.picker #picker { opacity: 1; top:0px; z-index: 900 }
|
||||
#interface .icon { width:30px; height:30px; margin-right:-2px; opacity: 1}
|
||||
|
||||
@@ -415,7 +415,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y)
|
||||
{
|
||||
dotgrid.guide.refresh();
|
||||
|
||||
if (e.target !== this.picker.el) {
|
||||
if(e.target !== this.picker.el){
|
||||
e.clipboardData.setData('text/source', dotgrid.tool.export(dotgrid.tool.layer()));
|
||||
e.clipboardData.setData('text/plain', dotgrid.tool.path());
|
||||
e.clipboardData.setData('text/html', dotgrid.renderer.to_svg());
|
||||
@@ -430,7 +430,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y)
|
||||
{
|
||||
dotgrid.guide.refresh();
|
||||
|
||||
if (e.target !== this.picker.el) {
|
||||
if(e.target !== this.picker.el){
|
||||
e.clipboardData.setData('text/plain', dotgrid.tool.export(dotgrid.tool.layer()));
|
||||
e.clipboardData.setData('text/html', dotgrid.renderer.to_svg());
|
||||
e.clipboardData.setData('text/svg+xml', dotgrid.renderer.to_svg());
|
||||
@@ -443,7 +443,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y)
|
||||
|
||||
this.paste = function(e)
|
||||
{
|
||||
if (e.target !== this.picker.el) {
|
||||
if(e.target !== this.picker.el){
|
||||
var data = e.clipboardData.getData("text/source");
|
||||
if (is_json(data)) {
|
||||
data = JSON.parse(data.trim());
|
||||
|
||||
@@ -7,7 +7,7 @@ function Picker()
|
||||
|
||||
this.start = function()
|
||||
{
|
||||
this.el.setAttribute("placeholder",`${dotgrid.tool.style().color} ${dotgrid.tool.settings.size.width}x${dotgrid.tool.settings.size.height}`)
|
||||
this.el.setAttribute("placeholder",`${dotgrid.tool.style().color}`)
|
||||
|
||||
dotgrid.controller.set("picker");
|
||||
dotgrid.interface.el.className = "picker"
|
||||
@@ -37,6 +37,8 @@ function Picker()
|
||||
dotgrid.interface.el.className = ""
|
||||
this.el.blur()
|
||||
this.el.value = ""
|
||||
|
||||
setTimeout(() => { dotgrid.interface.refresh(true); }, 500)
|
||||
}
|
||||
|
||||
this.set_color = function(color)
|
||||
|
||||
Reference in New Issue
Block a user