@millistream/millistream-widgets 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/millistream-widgets.js +9 -9
- package/package.json +1 -1
package/millistream-widgets.js
CHANGED
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
} else
|
|
74
74
|
if (value === 'all') {
|
|
75
75
|
args = args.map(function(a) {
|
|
76
|
-
return a * getPixelRatio();
|
|
76
|
+
return a * this.getPixelRatio();
|
|
77
77
|
});
|
|
78
78
|
} else if (Array.isArray(value)) {
|
|
79
79
|
for (i = 0, len = value.length; i < len; i++) {
|
|
80
|
-
args[value[i]] *= getPixelRatio();
|
|
80
|
+
args[value[i]] *= this.getPixelRatio();
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
|
|
90
90
|
prototype.stroke = (function(_super) {
|
|
91
91
|
return function() {
|
|
92
|
-
this.lineWidth *= getPixelRatio();
|
|
92
|
+
this.lineWidth *= this.getPixelRatio();
|
|
93
93
|
_super.apply(this, arguments);
|
|
94
|
-
this.lineWidth /= getPixelRatio();
|
|
94
|
+
this.lineWidth /= this.getPixelRatio();
|
|
95
95
|
};
|
|
96
96
|
})(prototype.stroke);
|
|
97
97
|
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
this.font = this.font.replace(
|
|
104
104
|
/(\d+)(px|em|rem|pt)/g,
|
|
105
105
|
function(w, m, u) {
|
|
106
|
-
return Math.floor(m
|
|
106
|
+
return Math.floor(m /** getPixelRatio()*/) + u;
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
109
|
var i = _super.apply(this, args);
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
this.font = this.font.replace(
|
|
128
128
|
/(\d+)(px|em|rem|pt)/g,
|
|
129
129
|
function(w, m, u) {
|
|
130
|
-
return (m * getPixelRatio()) + u;
|
|
130
|
+
return (m * this.getPixelRatio()) + u;
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
_super.apply(this, args);
|
|
@@ -139,13 +139,13 @@
|
|
|
139
139
|
return function() {
|
|
140
140
|
var args = Array.prototype.slice.call(arguments);
|
|
141
141
|
|
|
142
|
-
args[1] *= getPixelRatio();
|
|
143
|
-
args[2] *= getPixelRatio();
|
|
142
|
+
args[1] *= this.getPixelRatio();
|
|
143
|
+
args[2] *= this.getPixelRatio();
|
|
144
144
|
var tmp = this.font;
|
|
145
145
|
this.font = this.font.replace(
|
|
146
146
|
/(\d+)(px|em|rem|pt)/g,
|
|
147
147
|
function(w, m, u) {
|
|
148
|
-
return (m
|
|
148
|
+
return (m /** getPixelRatio()*/) + u;
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
|