I have setup an NG-INCLUDE which loads an SVG file that has classes “hover_color_change” so that the correct polygons can have their fill attribute updated: <div class="prod-illustration-div col s12 m8"> <div class="prod-svg-wrapper" ng-include="'/img/illustrations/illustration_' + productIdObj.illustration + '.svg'" onload="defaultFill(productIdObj.colors)"> </div> </div> I then have color swatches which trigger the $scope.hoverColorText() which calls the updateSVGFill() method to display the SVG fill matching the hover color and creates a shading of gradient so it’s not a solid color. Here is live link – WORKS IN CHROME In Chrome it works, however, in Safari, FF, Edge, it does not. I referenced this suggested answer which suggests referencing the ID attribute, which I believe I am already doing: $scope.defaultFill = function (colors) { if (colors) { var defaultCol...
Comments
Post a Comment