File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 5353 this.canvas = canvas; // we need canvas to recalculate mouse events
5454 this.abspos = !prnt;
5555
56+ this.check_parent = function(prnt) {
57+ if (prnt && (this.parent !== prnt)) {
58+ this.hide();
59+ this.parent = prnt;
60+ }
61+ }
62+
5663 this.pos = function(e) {
5764 // method used to define position of next tooltip
5865 // event is delivered from canvas,
149156 }
150157 };
151158
152- this.hide = function() {
159+ this.hide = function() {
153160 if (this.tt !== null)
154161 this.parent.removeChild(this.tt);
155162
368375
369376 this.cursor_changed = false;
370377 if (tip) {
371- var ignore_status = (this.painter && this.painter.enlarge_main && this.painter.enlarge_main('state')==='on');
378+ var ignore_status = ((typeof this.painter.enlarge_main=='function') && (this.painter.enlarge_main('state')==='on'));
379+
380+ this.tooltip.check_parent(this.painter.select_main().node());
381+
372382 this.tooltip.show(tip, mouse, ignore_status);
373383 this.tooltip.pos(evnt)
374384 } else {
You can’t perform that action at this time.
0 commit comments