Open ashemetov opened 4 years ago
thank you for your consderation in this matter.
I haven't considered browser extention yet. I will register it as an issue and test it.
Hi,
I had the same problem with Firefox (both e.offsetX
and e.offsetY
are always 0
). I've found a workaround in this answer to a question. It consists of replacing e.offsetX
and e.offsetY
by e.layerX
and e.layerY
in the mousePos
object if the browser is Firefox.
var mousePos = navigator.userAgent.search("Firefox") < 0 ? { x: e.offsetX, y: e.offsetY } : {x: e.layerX, y: e.layerY};
Really nice library with a great potential and the only one that do not use 'eval' so do not get blocked by CSP. However Zoom In/Zoom Out, Data table don't work in the popup created by browser extension (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction). I debugged a code a little bit, issue is that in the condition:
if (!_this.viewModel || !_this.viewModel.IsInGraph(mousePos)) return;
IsInGraph always return 'false' because 'mousePos' is always 'Object { x: 0, y: 0 }'.
Got zoom working by returning true, but obviously this is not a solution.
Any chance to add support for browser extensions?