diff --git a/js/SaverLoader.js b/js/SaverLoader.js index cae34d0..d5748db 100644 --- a/js/SaverLoader.js +++ b/js/SaverLoader.js @@ -86,7 +86,6 @@ class SaverLoader { } updateSessions() { - console.log("saverLoader.updateSessions()!"); $('#sessionMenu').empty(); let active_sessions = graph.active_sessions; if (active_sessions.length > 0) { diff --git a/js/ViewManager.js b/js/ViewManager.js index 90e290c..ad640ab 100644 --- a/js/ViewManager.js +++ b/js/ViewManager.js @@ -181,29 +181,36 @@ class ViewManager remove_object_svg(obj, 0); return; } + if (event == 'removed') { + // check here if tooltip is visible and has same key as the removed object + if (self.tooltip.is_visible && self.tooltip.key == obj.key) + self.tooltip.hide(); + } + switch (type) { case 'device': - self._update_devices(obj, event, repaint); + // only graph view might use device properties + if (event != 'modified' || this.currentView == 'graph') + self._update_devices(obj, event, repaint); break; case 'link': - self._update_links(obj, event, repaint); + if (event != 'modified' && this.currentView == 'chord') + self._update_links(obj, event, repaint); break; case 'signal': - self._update_signals(obj, event, repaint); + // only graph view might use signal properties + if (this.currentView == 'chord' || this.currentView == 'console') + break; + if (event != 'modified' || this.currentView == 'graph') + self._update_signals(obj, event, repaint); break; case 'map': self._update_maps(obj, event, repaint); break; case 'session': - console.log("got graph sessions callback!"); self._update_sessions(); break; } - if (event == 'removed') { - // check here if tooltip is visible and has same key as the removed object - if (self.tooltip.is_visible && self.tooltip.key == obj.key) - self.tooltip.hide(); - } }); }; @@ -270,7 +277,6 @@ class ViewManager } _update_sessions() { - console.log("ViewManager._update_sessions()"); $('#container').trigger("updateSessions"); } diff --git a/js/views/ChordView.js b/js/views/ChordView.js index 2af0d78..f8956af 100644 --- a/js/views/ChordView.js +++ b/js/views/ChordView.js @@ -47,14 +47,6 @@ class ChordView extends View { // remove associated svg elements for maps this.graph.maps.forEach(function(map) { remove_object_svg(map); }); - this.devCount = this.canvas.text(this.mapPane.cx, this.mapPane.cy, " ") - .attr({'font-size': 100, - 'opacity': 0.25, - 'fill': 'white', - 'x': this.mapPane.cx, - 'y': this.mapPane.cy}); - this.devCount.node.setAttribute('pointer-events', 'none'); - this.updateDevices(); this.resize(); } @@ -68,9 +60,6 @@ class ChordView extends View { this.mapPane.cy = this.frame.height * 0.5; this.radius = Math.min(this.frame.width, this.frame.height) * 0.25; - - this.devCount.attr({'x': this.mapPane.cx, - 'y': this.mapPane.cy}); } gap(numDevs) { @@ -605,10 +594,6 @@ class ChordView extends View { let updated = false; if (elements.indexOf('devices') >= 0) { this.updateDevices(); - if (this.onlineDevs) - this.devCount.attr({'text': ''}); - else - this.devCount.attr({'text': 'waiting for devices'}); updated = true; } if (elements.indexOf('links') >= 0) { @@ -628,8 +613,6 @@ class ChordView extends View { super.cleanup(); // clean up any objects created only for this view - if (this.devCount) - this.devCount.remove(); graph.links.forEach(function(link) { if (!link.view) return; @@ -642,6 +625,10 @@ class ChordView extends View { dev.view.stick.remove(); dev.view.stick = null; } + if (dev.view.label) { + dev.view.label.remove(); + dev.view.label = null; + } dev.view.unclick(); dev.view.unhover(); }); diff --git a/requirements.txt b/requirements.txt index 80052f4..99c31b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ netifaces==0.11.0 -libmapper==2.4.6 +libmapper==2.4.11 mappersession==0.0.15