Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48064

Re: Custom Visuals Sandbox is coming - Here's what you need to know

$
0
0

Hello, .

I encountered some additional issues caused by the sandboxing, for which I was not able to find suitable workarounds:

  1. IVisual's destroy() method is not invoked when changing the page on the report. I've been using this method to persist properties regarding the state of the visual so that the user can move between pages without having the visual reset. Is there another way I can perform this operation when the page is changed? My current workaround is to persist the state every time the user performs a sequence of state changing operations, but it is a horrible solution because it involves a lot of unnecessary communication with the server and it invokes the update() method every time.
  2. DOM drag events are not functioning properly. More specifically, when a "drag" event occures, it won't stop firing even after the mouse button is released. Also, the "dragend" event never occurs. This causes the dragged element to be dragged indefinitely. My guess is that the window element's events are not captured inside the visual's iframe so elements inside it are not informed when the mouse button is released. My workaround for this issue was- a) Defining a flag that makes the drag event handler to return immediately when set to "false". b) Set the flag to "true" on "dragstart". c) Set the flag to "false" on "mouseup" events for all of the element's ancestors and the window element. The problem with this solution is that the drag event never stops firing, and just won't perform anything when the flag is set to "false". Additionally, while this workaround works better than expected in Firefox and Chrome, it has some annoying issues in IE11 and Edge(Will specify if needed).

I'd appreciate your assistance on these matters,

Thank you,

Itay.


Viewing all articles
Browse latest Browse all 48064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>