diff options
author | wout <wout@impinc.co.uk> | 2014-07-31 20:31:07 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-07-31 20:31:07 +0200 |
commit | 98b3ec9d79ef31d59dc865fbc15919b44c69b576 (patch) | |
tree | e1bf9c0c6293a5122f5da9443dec7ee82ed7c4d0 /src/spof.js | |
parent | b2ab34637b96f7bab941390f71b7aafd46ec5565 (diff) | |
download | svg.js-98b3ec9d79ef31d59dc865fbc15919b44c69b576.tar.gz svg.js-98b3ec9d79ef31d59dc865fbc15919b44c69b576.zip |
Reworked sub-pixel offset fix
Diffstat (limited to 'src/spof.js')
-rw-r--r-- | src/spof.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/spof.js b/src/spof.js deleted file mode 100644 index cf4fe2f..0000000 --- a/src/spof.js +++ /dev/null @@ -1,31 +0,0 @@ -// Fix for possible sub-pixel offset. See: -// https://bugzilla.mozilla.org/show_bug.cgi?id=608812 -SVG.extend(SVG.Doc, { - // Callback - spof: function() { - if (this.doSpof) { - var pos = this.node.getScreenCTM() - - if (pos) - this - .style('left', (-pos.e % 1) + 'px') - .style('top', (-pos.f % 1) + 'px') - } - - return this - } - - // Sub-pixel offset enabler -, fixSubPixelOffset: function() { - var self = this - - // Enable spof - this.doSpof = true - - // Make sure sub-pixel offset is fixed every time the window is resized - SVG.on(window, 'resize', function() { self.spof() }) - - return this.spof() - } - -})
\ No newline at end of file |