Child pages
  • Network map and chromium
Skip to end of metadata
Go to start of metadata

Trouble and solution: http://jointjs.com/blog/get-transform-to-element-polyfill.html

Steps:

  1. Create file static/pkg/jointjs/transform.js with following content:

    SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(toElement) {
        return toElement.getScreenCTM().inverse().multiply(this.getScreenCTM());
    };
  2. Patch inv/apps/map/js/MapPanel.js:

    diff -r 877ebcf09554 inv/apps/map/js/MapPanel.js
    --- a/inv/apps/map/js/MapPanel.js    Tue Feb 02 14:04:43 2016 +0300
    +++ b/inv/apps/map/js/MapPanel.js    Tue Feb 02 19:27:13 2016 +0300
    @@ -106,6 +106,7 @@
             me.callParent();
             load_scripts([
                 "/static/pkg/jquery/jquery.js",
    +            "/static/pkg/jointjs/transform.js",
                 "/static/pkg/jointjs/jointjs.js"
             ], me, me.initMap);
         },
  • No labels