From a5a9fb3e6f5ca6962eaf9c10edbe91496742b342 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 16 Jan 2017 21:29:39 -0700 Subject: [PATCH] Various fixes --- README.md | 6 +++--- sources/links/main.css | 6 +++--- sources/ronin.html | 6 ------ sources/scripts/core/init.js | 3 +-- sources/scripts/modules/brush.js | 3 +-- sources/scripts/modules/file.save.js | 6 ++++-- sources/scripts/modules/help.js | 2 +- 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4c2a079..93dfd41 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Missing documentation. - Variables: ### $ FileSave -Missing documentation. +Creates a new window with a image of the resulting canvas in the specified format. - Parameters: `Any` -- Variables: +- Variables: `format` ### ^ History Missing documentation. @@ -115,5 +115,5 @@ rate=10 ; variable: rate = 10 ## Templates ### Watermark ``` -# 1280x720 ; / ../assets/photo.jpg 1280x 0,0 ; / ../assets/logo.png 60x60 20,660 +# 1280x720 ; / ../assets/photo.jpg 1280x 0,0 ; / ../assets/logo.png 60x60 20,620 ``` \ No newline at end of file diff --git a/sources/links/main.css b/sources/links/main.css index 93f28a0..11ade73 100644 --- a/sources/links/main.css +++ b/sources/links/main.css @@ -7,11 +7,11 @@ canvas:hover { cursor: crosshair;} #surface { width:50vw; height:50vh; overflow:hidden; position:fixed; left:50%; top:50%; background:none; border-radius:3px;} #surface .layer { position:absolute; top:0px; left:0px; width:100%; height:100%;} #overlay { position:absolute; z-index:1000;} -#widget { color:#fff; position:absolute; font-size:10px; padding-top:10px; border-top:1px solid #333; background-image:url(../media/graphics/logo.svg); background-repeat:no-repeat; background-size:80px 80px; height:100px; background-position: -10px 10px} +#widget { color:#fff; position:absolute; font-size:10px; padding-top:10px; border-top:1px solid #333; background-image:url(../media/graphics/logo.svg); background-repeat:no-repeat; background-size:80px 80px; height:100px; background-position: -10px 10px; line-height:20px;} #widget .module:first-child { margin-left:80px; } -#widget .module { float:left; margin-right:10px; margin-top:5px } +#widget .module { float:left; margin-right:10px; margin-top:5px; width: 20% } #widget .module .highlight:after { content:"_"; color:red;} -#widget .cursor { float:right; text-align: right} +#widget .cursor { float:right; text-align: right; margin-top:5px} #widget .layer:hover { cursor:pointer;} #commander { display:none; z-index: 2000; position:fixed; } diff --git a/sources/ronin.html b/sources/ronin.html index 6bba1c8..cf629a2 100644 --- a/sources/ronin.html +++ b/sources/ronin.html @@ -35,12 +35,6 @@ - - diff --git a/sources/scripts/core/init.js b/sources/scripts/core/init.js index 5c9fff0..40bbde1 100644 --- a/sources/scripts/core/init.js +++ b/sources/scripts/core/init.js @@ -38,5 +38,4 @@ commander.query("# layer=background"); // commander.query("# #efefef"); commander.query("# layer=main"); commander.query("> 1 0,0 #ff0000"); -commander.query("> 1 1,0 #ff0000"); -commander.query("> 1 0,1 #ff0000"); \ No newline at end of file +commander.query("> 1 1,1 #ff0000"); \ No newline at end of file diff --git a/sources/scripts/modules/brush.js b/sources/scripts/modules/brush.js index d0c3de1..c39dd41 100644 --- a/sources/scripts/modules/brush.js +++ b/sources/scripts/modules/brush.js @@ -76,8 +76,7 @@ function Brush(rune) this.widget_cursor = function() { - - var s = "> "+this.size+"
"; + var s = "> "+this.size+" "+this.color.hex+"
"; for (i = 0; i < ronin.brush.pointers.length; i++) { s += ronin.brush.pointers[i].widget(); diff --git a/sources/scripts/modules/file.save.js b/sources/scripts/modules/file.save.js index 3df86ca..cd7db04 100644 --- a/sources/scripts/modules/file.save.js +++ b/sources/scripts/modules/file.save.js @@ -3,13 +3,15 @@ function FileSave(rune) Module.call(this,rune); this.parameters = [Any]; - this.variables = {"format" : "png"}; + this.variables = {"format" : "[png/jpg]"}; + + this.docs = "Creates a new window with a image of the resulting canvas in the specified format."; this.active = function(cmd) { var d = null; - if(cmd.variable("format").value == "jpg"){ + if(cmd.variable("format") && cmd.variable("format").value == "jpg"){ var d = ronin.surface.active_layer.element.toDataURL('image/jpeg'); } else{ diff --git a/sources/scripts/modules/help.js b/sources/scripts/modules/help.js index 2e60b2c..f6ce3a3 100644 --- a/sources/scripts/modules/help.js +++ b/sources/scripts/modules/help.js @@ -63,7 +63,7 @@ function Help(rune) html += "```\n# Light\n> 1,1;> 2,2;> 3,3;> 4,4\n# Hard\n> 2,2;> 4,4;> 6,6;> 8,8\n# Symmetric Light\n> 1,1 600x;> 2,2 600x;> 3,3 600x;> 4,4 600x\n```\n"; html += "## Templates\n"; html += "### Watermark\n"; - html += "```\n# 1280x800 ; / ../assets/photo.jpg 1280x 0,0 ; / assets/logo.png 60x60 20,720\n```\n"; + html += "```\n# 1280x720 ; / ../assets/photo.jpg 1280x 0,0 ; / ../assets/logo.png 60x60 20,640\n```\n"; return html; }