Skip to content

Commit 2981582

Browse files
committed
v7 - always set interactive handlers
1 parent f9cacdc commit 2981582

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

scripts/JSRootPainter.v7.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,23 +2080,25 @@
20802080
TFramePainter.prototype.AddInteractive = function() {
20812081
// only first painter in list allowed to add interactive functionality to the frame
20822082

2083-
if (!JSROOT.gStyle.Zooming && !JSROOT.gStyle.ContextMenu) return;
2083+
if (JSROOT.BatchMode || (!JSROOT.gStyle.Zooming && !JSROOT.gStyle.ContextMenu)) return;
20842084

20852085
var svg = this.svg_frame();
20862086

2087-
if (svg.empty() || svg.property('interactive_set')) return;
2087+
if (svg.empty()) return;
20882088

20892089
var svg_x = svg.selectAll(".xaxis_container"),
20902090
svg_y = svg.selectAll(".yaxis_container");
20912091

2092-
this.AddKeysHandler();
2092+
if (!svg.property('interactive_set')) {
2093+
this.AddKeysHandler();
20932094

2094-
this.last_touch = new Date(0);
2095-
this.zoom_kind = 0; // 0 - none, 1 - XY, 2 - only X, 3 - only Y, (+100 for touches)
2096-
this.zoom_rect = null;
2097-
this.zoom_origin = null; // original point where zooming started
2098-
this.zoom_curr = null; // current point for zooming
2099-
this.touch_cnt = 0;
2095+
this.last_touch = new Date(0);
2096+
this.zoom_kind = 0; // 0 - none, 1 - XY, 2 - only X, 3 - only Y, (+100 for touches)
2097+
this.zoom_rect = null;
2098+
this.zoom_origin = null; // original point where zooming started
2099+
this.zoom_curr = null; // current point for zooming
2100+
this.touch_cnt = 0;
2101+
}
21002102

21012103
if (JSROOT.gStyle.Zooming && (!this.options || !this.options.Proj)) {
21022104
if (JSROOT.gStyle.ZoomMouse) {

0 commit comments

Comments
 (0)