Stripped the trailing vars
This commit is contained in:
parent
5c7e5a1512
commit
e1ff9358b5
@ -14,7 +14,6 @@ function Commander()
|
|||||||
|
|
||||||
this.validate = function(q = ronin.commander.query())
|
this.validate = function(q = ronin.commander.query())
|
||||||
{
|
{
|
||||||
console.info(q.string)
|
|
||||||
if(!ronin.modules[q.module]){ console.log("Unknown module",q.module); return; }
|
if(!ronin.modules[q.module]){ console.log("Unknown module",q.module); return; }
|
||||||
if(q.raw.indexOf("$") > -1){ console.log("Variables present"); return; }
|
if(q.raw.indexOf("$") > -1){ console.log("Variables present"); return; }
|
||||||
if(q.raw.indexOf(";") > -1){ this.validate_multi(q); return; }
|
if(q.raw.indexOf(";") > -1){ this.validate_multi(q); return; }
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
function Query(query_str = "")
|
function Query(query_str = "")
|
||||||
{
|
{
|
||||||
|
// Strip trailing variables
|
||||||
|
query_str = query_str.indexOf("&$+") > -1 ? query_str.replace("&$+","").trim() : query_str
|
||||||
|
|
||||||
this.string = query_str;
|
this.string = query_str;
|
||||||
this.module = query_str.split(" ")[0];
|
this.module = query_str.split(" ")[0];
|
||||||
var parts = query_str.split(" ").splice(1);
|
var parts = query_str.split(" ").splice(1);
|
||||||
|
@ -2,7 +2,7 @@ function Path()
|
|||||||
{
|
{
|
||||||
Module.call(this,"path","Trace lines and to draw shapes.");
|
Module.call(this,"path","Trace lines and to draw shapes.");
|
||||||
|
|
||||||
this.settings = {thickness:4,color:"white",cap:"square"};
|
this.settings = {thickness:4,color:"red",cap:"square"};
|
||||||
|
|
||||||
this.methods.stroke = new Method("stroke","x,y&","",function(q){
|
this.methods.stroke = new Method("stroke","x,y&","",function(q){
|
||||||
ronin.preview.clear();
|
ronin.preview.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user