--- a/src_js/iconolab-bundle/src/components/editor/ShapeRect.vue Mon Feb 20 17:14:08 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/ShapeRect.vue Mon Feb 20 17:29:55 2017 +0100
@@ -38,6 +38,7 @@
props: [
'paper',
'original-annotation',
+ 'tooltip'
],
data() {
return {
@@ -153,7 +154,7 @@
bottomRightHandler.drag(handlerEvents.onMove, handlerEvents.onStart, handlerEvents.onEnd);
},
- fromSVGPath: function(pathString, imageWidth, imageHeight) {
+ fromSVGPath: function(pathString, tooltip) {
var bBox = Snap.path.getBBox(pathString);
Object.assign(this, {
@@ -161,10 +162,13 @@
width: bBox.width, height: bBox.height
});
- setTimeout(() => {
+ this.$nextTick(() => {
this.addResizeHandlers();
- this.addTooltip();
- }, 50);
+ if (tooltip) {
+ // FIXME Race condition with destroy
+ setTimeout(() => this.addTooltip(), 250);
+ }
+ });
},
toSVGPath: function() {