diff options
author | neauoire <[email protected]> | 2020-04-17 07:47:49 +0900 |
---|---|---|
committer | neauoire <[email protected]> | 2020-04-17 07:47:49 +0900 |
commit | a61b035b31b327848b759d158515395fb6eb0a85 (patch) | |
tree | 80b3a86b7612775a17cd7df372020f7f64aa0168 /desktop | |
parent | 926b69a9291e59a364a345be40f9dad057b824d3 (diff) | |
download | Orca-a61b035b31b327848b759d158515395fb6eb0a85.tar.gz Orca-a61b035b31b327848b759d158515395fb6eb0a85.zip |
Modified how select and write handle missing parameters
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/package-lock.json | 21 | ||||
-rw-r--r-- | desktop/package.json | 2 | ||||
-rw-r--r-- | desktop/sources/scripts/client.js | 2 | ||||
-rw-r--r-- | desktop/sources/scripts/commander.js | 6 |
4 files changed, 8 insertions, 23 deletions
diff --git a/desktop/package-lock.json b/desktop/package-lock.json index 58e1c1c..0da4c91 100644 --- a/desktop/package-lock.json +++ b/desktop/package-lock.json @@ -350,9 +350,9 @@ "dev": true }, "electron": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-8.2.1.tgz", - "integrity": "sha512-+1PispFqjyKj3VeOPbEKEl6LYxPW41OxHgh9CGN8KeGygsKDHSZuuG9rYc+b9NeeaAl+gnV9VO2JOe7BIzXyOg==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-8.2.2.tgz", + "integrity": "sha512-GH4RCbpuzEn3XpTmsf+wLaJ2KOPSOoBJvQ0s6ftTLs5+IQEgKZvkdYCj8TCBNXFhss31RT3BUqoEQQUyZErK0A==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -506,21 +506,6 @@ "ms": "2.0.0" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", diff --git a/desktop/package.json b/desktop/package.json index 0ee4f73..73720b1 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -23,7 +23,7 @@ "push": "npm run build ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run status" }, "devDependencies": { - "electron": "^8.2.1", + "electron": "^8.2.2", "electron-packager": "^14.2.1" }, "dependencies": { diff --git a/desktop/sources/scripts/client.js b/desktop/sources/scripts/client.js index 792a684..0fbfc36 100644 --- a/desktop/sources/scripts/client.js +++ b/desktop/sources/scripts/client.js @@ -12,7 +12,7 @@ /* global Theme */ function Client () { - this.version = 174 + this.version = 175 this.library = library this.theme = new Theme(this) diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 74922a8..9f108e2 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -10,7 +10,7 @@ function Commander (client) { this.passives = { find: (p) => { client.cursor.find(p.str) }, - select: (p) => { client.cursor.select(p.x, p.y, p.w, p.h) }, + select: (p) => { client.cursor.select(p.x, p.y, p.w || 0, p.h || 0) }, inject: (p) => { client.cursor.select(p._x, p._y) if (client.source.cache[p._str + '.orca']) { @@ -54,7 +54,7 @@ function Commander (client) { }, // Edit find: (p) => { client.cursor.find(p.str) }, - select: (p) => { client.cursor.select(p.x, p.y, p.w, p.h) }, + select: (p) => { client.cursor.select(p.x, p.y, p.w || 0, p.h || 0) }, inject: (p, origin) => { const block = client.source.cache[p._str + '.orca'] if (!block) { console.warn('Commander', 'Unknown block: ' + p._str); return } @@ -62,7 +62,7 @@ function Commander (client) { client.cursor.scaleTo(0, 0) }, write: (p) => { - client.orca.writeBlock(p._x || 0, p._y || 0, p._str) + client.orca.writeBlock(p._x || client.cursor.x, p._y || client.cursor.y, p._str) } } |