yblake / deltaViz

deltaViz dashboard extension for Qlik® Sense
Other
15 stars 15 forks source link

SVG <PATH> w/ AngularJS not working #11

Closed j9mist closed 5 years ago

j9mist commented 6 years ago

Hi,

I have been using this extension for quite some time and am very happy with it. I just recently found an issue that I believe might create some headaches with AngularJS. When using this in a QlikSense mashup, I noticed that in a single page application, the routing screws up the element not rendering. This has to do with the URL() in the MASK attribute.

A good way to test this is to include the extension in a mashup with say the URL "http://myserver/myhome.html". The extension renders fine. Now changing it to "http://myserver/myhome.html#/" which is what AngularJS routing would do, the icons will stop showing up.

I've done some research and it seems like the AngularJS and SVGs don't play nice together.

Do you have any insight into how to fix this?

Also, I am including a copy of the extension where I have modified it to include some additional attributes. I have also fixed a bug with this extension not working properly in IE.

Thanks.

graphics-deltaviz-delta - rename to js.txt

yblake commented 6 years ago

Hi,

Thank you for your feedback.

Regarding IE issue, I don't understand what is the problem ? It was working, at least two years ago when I released the extension.

Regarding side effects beetween SVG masking and Angular, this is described here : https://github.com/angular/angular.js/issues/8934

You should add a console print of url after this line : var url = $(location).attr('href');

And check differences when embedded in an application or in a mashup.