aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorneauoire <[email protected]>2020-01-30 11:34:51 -0500
committerneauoire <[email protected]>2020-01-30 11:34:51 -0500
commit4b75983f775a148000ba6b56306ad51e093dec87 (patch)
treedac25ac41e43e918c3f9652fa7f490a983145659
parent9aca0fc07c1fa8330771f1df376ce82f54d56711 (diff)
downloadOrca-4b75983f775a148000ba6b56306ad51e093dec87.tar.gz
Orca-4b75983f775a148000ba6b56306ad51e093dec87.zip
Fixed display issue
-rw-r--r--desktop/sources/scripts/client.js9
-rw-r--r--desktop/sources/scripts/core/io/midi.js28
2 files changed, 19 insertions, 18 deletions
diff --git a/desktop/sources/scripts/client.js b/desktop/sources/scripts/client.js
index 6fcdd38..f482f06 100644
--- a/desktop/sources/scripts/client.js
+++ b/desktop/sources/scripts/client.js
@@ -238,7 +238,7 @@ function Client () {
}
this.isInvisible = (x, y) => {
- return this.orca.glyphAt(x, y) === '.' && !this.isMarker(x, y) && !this.cursor.selected(x, y) && !this.isLocals(x, y) && !this.ports[this.orca.indexAt(x, y)]
+ return this.orca.glyphAt(x, y) === '.' && !this.isMarker(x, y) && !this.cursor.selected(x, y) && !this.isLocals(x, y) && !this.ports[this.orca.indexAt(x, y)] && !this.orca.lockAt(x, y)
}
this.findPorts = () => {
@@ -308,12 +308,13 @@ function Client () {
}
this.makeStyle = (x, y, glyph, selection) => {
- const isLocked = this.orca.lockAt(x, y)
- const port = this.ports[this.orca.indexAt(x, y)]
if (this.cursor.selected(x, y)) { return 4 }
+ const isLocked = this.orca.lockAt(x, y)
if (selection === glyph && isLocked === false && selection !== '.') { return 6 }
if (glyph === '*' && isLocked === false) { return 2 }
- if (port && port.reader) { return 9 }
+
+ const port = this.ports[this.orca.indexAt(x, y)]
+
if (port) { return port[2] }
if (isLocked === true) { return 5 }
return 20
diff --git a/desktop/sources/scripts/core/io/midi.js b/desktop/sources/scripts/core/io/midi.js
index 3f98c64..a298237 100644
--- a/desktop/sources/scripts/core/io/midi.js
+++ b/desktop/sources/scripts/core/io/midi.js
@@ -93,20 +93,6 @@ function Midi (client) {
this.ticks = []
- this.sendClock = function () {
- if (!this.outputDevice()) { return }
- if (this.isClock !== true) { return }
-
- const bpm = client.clock.speed.value
- const frameTime = (60000 / bpm) / 4
- const frameFrag = frameTime / 6
-
- for (let id = 0; id < 6; id++) {
- if (this.ticks[id]) { clearTimeout(this.ticks[id]) }
- this.ticks[id] = setTimeout(() => { this.outputDevice().send([0xF8], 0) }, parseInt(id) * frameFrag)
- }
- }
-
this.sendClockStart = function () {
if (!this.outputDevice()) { return }
this.isClock = true
@@ -121,6 +107,20 @@ function Midi (client) {
console.log('MIDI', 'MIDI Stop Sent')
}
+ this.sendClock = function () {
+ if (!this.outputDevice()) { return }
+ if (this.isClock !== true) { return }
+
+ const bpm = client.clock.speed.value
+ const frameTime = (60000 / bpm) / 4
+ const frameFrag = frameTime / 6
+
+ for (let id = 0; id < 6; id++) {
+ if (this.ticks[id]) { clearTimeout(this.ticks[id]) }
+ this.ticks[id] = setTimeout(() => { this.outputDevice().send([0xF8], 0) }, parseInt(id) * frameFrag)
+ }
+ }
+
this.receive = function (msg) {
switch (msg.data[0]) {
// Clock