Remove info UI when clicking on already active object

0.2
Robin Hawkes 2015-03-08 17:01:34 +00:00
rodzic cf5cf5a314
commit 146b0e603c
3 zmienionych plików z 19 dodań i 9 usunięć

Wyświetl plik

@ -9166,17 +9166,22 @@ if (typeof window === undefined) {
}
// console.log("Clicked:", geom.id);
var pickedId;
// Create info panel
if (self.infoUI) {
if (self.lastPickedIdClick) {
self.infoUI.removePanel(self.lastPickedIdClick);
self.infoUI.removePanel(self.lastPickedIdClick);
pickedId = undefined;
}
self.infoUI.addPanel(self.pickedMesh, feature.value);
if (!self.lastPickedIdClick || self.lastPickedIdClick !== self.pickedMesh.id) {
self.infoUI.addPanel(self.pickedMesh, feature.value);
pickedId = self.pickedMesh.id;
}
}
self.lastPickedIdClick = self.pickedMesh.id;
self.lastPickedIdClick = pickedId;
});
});

6
build/vizi.min.js vendored

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -234,17 +234,22 @@
}
// console.log("Clicked:", geom.id);
var pickedId;
// Create info panel
if (self.infoUI) {
if (self.lastPickedIdClick) {
self.infoUI.removePanel(self.lastPickedIdClick);
self.infoUI.removePanel(self.lastPickedIdClick);
pickedId = undefined;
}
self.infoUI.addPanel(self.pickedMesh, feature.value);
if (!self.lastPickedIdClick || self.lastPickedIdClick !== self.pickedMesh.id) {
self.infoUI.addPanel(self.pickedMesh, feature.value);
pickedId = self.pickedMesh.id;
}
}
self.lastPickedIdClick = self.pickedMesh.id;
self.lastPickedIdClick = pickedId;
});
});