summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/mx/mx.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-24 12:18:36 -0500
committerJules Laplace <jules@okfoc.us>2014-11-24 12:18:36 -0500
commit9e3db38d8ffa0042a45ebe39ca193c13a303cede (patch)
treea0bb2e9ba6dbbcafcc5f51bd1057ae636c71694b /public/assets/javascripts/mx/mx.js
parent996e4e3758c5953ef84eeaca0eacc3111fba5d85 (diff)
parentd941ec46ee1d3842387837377140e8d1fc854b17 (diff)
merge
Diffstat (limited to 'public/assets/javascripts/mx/mx.js')
-rw-r--r--public/assets/javascripts/mx/mx.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/public/assets/javascripts/mx/mx.js b/public/assets/javascripts/mx/mx.js
index 40a5f2e..d59a551 100644
--- a/public/assets/javascripts/mx/mx.js
+++ b/public/assets/javascripts/mx/mx.js
@@ -162,24 +162,24 @@ var MX = MX || (function (undefined) {
Object.defineProperty(this, 'width', {
get: function () {
return width
- || parseInt(self.el.style.width, 10)
+ || parseInt(self.el.style.width*devicePixelRatio, 10)
|| 0
},
set: function (val) {
width = val
- this.el.style.width = width + 'px'
+ this.el.style.width = (width/devicePixelRatio) + 'px'
}
})
Object.defineProperty(this, 'height', {
get: function () {
return height
- || parseInt(self.el.style.height, 10)
+ || parseInt(self.el.style.height*devicePixelRatio, 10)
|| 0
},
set: function (val) {
height = val
- this.el.style.height = height + 'px'
+ this.el.style.height = (height/devicePixelRatio) + 'px'
}
})
}
@@ -302,9 +302,9 @@ var MX = MX || (function (undefined) {
+ (-this.y).toFixed(floatPrecision) + 'px,'
+ (-this.z).toFixed(floatPrecision) + 'px) '
+ 'scale3d('
- + this.scaleX.toFixed(floatPrecision) + ','
- + this.scaleY.toFixed(floatPrecision) + ','
- + this.scaleZ.toFixed(floatPrecision) + ') '
+ + (devicePixelRatio * this.scaleX).toFixed(floatPrecision) + ','
+ + (devicePixelRatio * this.scaleY).toFixed(floatPrecision) + ','
+ + (devicePixelRatio * this.scaleZ).toFixed(floatPrecision) + ') '
if (rotationTranslation) {
transformString += rotationTranslation.before