fabric-rails 1.0.12.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/README.md +1 -1
  3. data/lib/fabric/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/cufon.js +1226 -0
  5. data/vendor/assets/javascripts/event.js +20 -20
  6. data/vendor/assets/javascripts/excanvas.js +1464 -0
  7. data/vendor/assets/javascripts/fabric.js +56 -33
  8. data/vendor/assets/javascripts/fabric/HEADER.js +2 -4
  9. data/vendor/assets/javascripts/fabric/brushes/base_brush.class.js +96 -0
  10. data/vendor/assets/javascripts/fabric/brushes/circle_brush.class.js +99 -0
  11. data/vendor/assets/javascripts/fabric/brushes/pattern_brush.class.js +55 -0
  12. data/vendor/assets/javascripts/fabric/{freedrawing.class.js → brushes/pencil_brush.class.js} +73 -65
  13. data/vendor/assets/javascripts/fabric/brushes/spray_brush.class.js +157 -0
  14. data/vendor/assets/javascripts/fabric/canvas.class.js +154 -135
  15. data/vendor/assets/javascripts/fabric/color.class.js +195 -29
  16. data/vendor/assets/javascripts/fabric/filters/brightness_filter.class.js +70 -0
  17. data/vendor/assets/javascripts/fabric/filters/convolute_filter.class.js +122 -0
  18. data/vendor/assets/javascripts/fabric/filters/gradienttransparency_filter.class.js +69 -0
  19. data/vendor/assets/javascripts/fabric/filters/grayscale_filter.class.js +61 -0
  20. data/vendor/assets/javascripts/fabric/filters/invert_filter.class.js +57 -0
  21. data/vendor/assets/javascripts/fabric/filters/noise_filter.class.js +73 -0
  22. data/vendor/assets/javascripts/fabric/filters/pixelate_filter.class.js +98 -0
  23. data/vendor/assets/javascripts/fabric/filters/removewhite_filter.class.js +86 -0
  24. data/vendor/assets/javascripts/fabric/filters/sepia2_filter.class.js +61 -0
  25. data/vendor/assets/javascripts/fabric/filters/sepia_filter.class.js +58 -0
  26. data/vendor/assets/javascripts/fabric/filters/tint_filter.class.js +80 -0
  27. data/vendor/assets/javascripts/fabric/gradient.class.js +232 -80
  28. data/vendor/assets/javascripts/fabric/intersection.class.js +10 -28
  29. data/vendor/assets/javascripts/fabric/log.js +0 -2
  30. data/vendor/assets/javascripts/fabric/{canvas_animation.mixin.js → mixins/canvas_animation.mixin.js} +3 -6
  31. data/vendor/assets/javascripts/fabric/mixins/canvas_dataurl_exporter.mixin.js +137 -0
  32. data/vendor/assets/javascripts/fabric/{canvas_events.mixin.js → mixins/canvas_events.mixin.js} +97 -144
  33. data/vendor/assets/javascripts/fabric/{canvas_gestures.mixin.js → mixins/canvas_gestures.mixin.js} +4 -8
  34. data/vendor/assets/javascripts/fabric/{canvas_serialization.mixin.js → mixins/canvas_serialization.mixin.js} +19 -14
  35. data/vendor/assets/javascripts/fabric/mixins/collection.mixin.js +137 -0
  36. data/vendor/assets/javascripts/fabric/{object_geometry.mixin.js → mixins/object_geometry.mixin.js} +130 -47
  37. data/vendor/assets/javascripts/fabric/{object_interactivity.mixin.js → mixins/object_interactivity.mixin.js} +21 -102
  38. data/vendor/assets/javascripts/fabric/{object_origin.mixin.js → mixins/object_origin.mixin.js} +36 -26
  39. data/vendor/assets/javascripts/fabric/{object_straightening.mixin.js → mixins/object_straightening.mixin.js} +4 -9
  40. data/vendor/assets/javascripts/fabric/{observable.mixin.js → mixins/observable.mixin.js} +27 -35
  41. data/vendor/assets/javascripts/fabric/mixins/stateful.mixin.js +45 -0
  42. data/vendor/assets/javascripts/fabric/node.js +62 -26
  43. data/vendor/assets/javascripts/fabric/parser.js +181 -58
  44. data/vendor/assets/javascripts/fabric/pattern.class.js +43 -14
  45. data/vendor/assets/javascripts/fabric/point.class.js +4 -43
  46. data/vendor/assets/javascripts/fabric/shadow.class.js +19 -19
  47. data/vendor/assets/javascripts/fabric/{circle.class.js → shapes/circle.class.js} +32 -29
  48. data/vendor/assets/javascripts/fabric/{ellipse.class.js → shapes/ellipse.class.js} +45 -27
  49. data/vendor/assets/javascripts/fabric/{group.class.js → shapes/group.class.js} +67 -169
  50. data/vendor/assets/javascripts/fabric/{image.class.js → shapes/image.class.js} +134 -72
  51. data/vendor/assets/javascripts/fabric/{line.class.js → shapes/line.class.js} +67 -36
  52. data/vendor/assets/javascripts/fabric/{object.class.js → shapes/object.class.js} +394 -252
  53. data/vendor/assets/javascripts/fabric/{path.class.js → shapes/path.class.js} +89 -174
  54. data/vendor/assets/javascripts/fabric/{path_group.class.js → shapes/path_group.class.js} +12 -18
  55. data/vendor/assets/javascripts/fabric/{polygon.class.js → shapes/polygon.class.js} +64 -38
  56. data/vendor/assets/javascripts/fabric/{polyline.class.js → shapes/polyline.class.js} +64 -39
  57. data/vendor/assets/javascripts/fabric/{rect.class.js → shapes/rect.class.js} +78 -112
  58. data/vendor/assets/javascripts/fabric/{text.class.js → shapes/text.class.js} +264 -270
  59. data/vendor/assets/javascripts/fabric/shapes/text.cufon.js +79 -0
  60. data/vendor/assets/javascripts/fabric/{triangle.class.js → shapes/triangle.class.js} +46 -26
  61. data/vendor/assets/javascripts/fabric/static_canvas.class.js +134 -358
  62. data/vendor/assets/javascripts/fabric/util/anim_ease.js +2 -31
  63. data/vendor/assets/javascripts/fabric/util/dom_event.js +21 -7
  64. data/vendor/assets/javascripts/fabric/util/dom_misc.js +49 -39
  65. data/vendor/assets/javascripts/fabric/util/dom_request.js +1 -2
  66. data/vendor/assets/javascripts/fabric/util/dom_style.js +1 -2
  67. data/vendor/assets/javascripts/fabric/util/lang_array.js +19 -13
  68. data/vendor/assets/javascripts/fabric/util/lang_class.js +1 -2
  69. data/vendor/assets/javascripts/fabric/util/lang_function.js +3 -1
  70. data/vendor/assets/javascripts/fabric/util/lang_object.js +5 -5
  71. data/vendor/assets/javascripts/fabric/util/lang_string.js +7 -5
  72. data/vendor/assets/javascripts/fabric/util/misc.js +207 -42
  73. metadata +47 -29
  74. data/vendor/assets/javascripts/fabric/image_filters.js +0 -809
  75. data/vendor/assets/javascripts/fabric/scout.js +0 -45
  76. data/vendor/assets/javascripts/fabric/stateful.js +0 -88
@@ -2,7 +2,6 @@
2
2
 
3
3
  /**
4
4
  * Quadratic easing in
5
- * @method easeInQuad
6
5
  * @memberOf fabric.util.ease
7
6
  */
8
7
  function easeInQuad(t, b, c, d) {
@@ -11,7 +10,6 @@
11
10
 
12
11
  /**
13
12
  * Quadratic easing out
14
- * @method easeOutQuad
15
13
  * @memberOf fabric.util.ease
16
14
  */
17
15
  function easeOutQuad(t, b, c, d) {
@@ -20,7 +18,6 @@
20
18
 
21
19
  /**
22
20
  * Quadratic easing in and out
23
- * @method easeInOutQuad
24
21
  * @memberOf fabric.util.ease
25
22
  */
26
23
  function easeInOutQuad(t, b, c, d) {
@@ -31,7 +28,6 @@
31
28
 
32
29
  /**
33
30
  * Cubic easing in
34
- * @method easeInCubic
35
31
  * @memberOf fabric.util.ease
36
32
  */
37
33
  function easeInCubic(t, b, c, d) {
@@ -40,7 +36,6 @@
40
36
 
41
37
  /**
42
38
  * Cubic easing out
43
- * @method easeOutCubic
44
39
  * @memberOf fabric.util.ease
45
40
  */
46
41
  function easeOutCubic(t, b, c, d) {
@@ -49,7 +44,6 @@
49
44
 
50
45
  /**
51
46
  * Cubic easing in and out
52
- * @method easeInOutCubic
53
47
  * @memberOf fabric.util.ease
54
48
  */
55
49
  function easeInOutCubic(t, b, c, d) {
@@ -60,7 +54,6 @@
60
54
 
61
55
  /**
62
56
  * Quartic easing in
63
- * @method easeInQuart
64
57
  * @memberOf fabric.util.ease
65
58
  */
66
59
  function easeInQuart(t, b, c, d) {
@@ -69,7 +62,6 @@
69
62
 
70
63
  /**
71
64
  * Quartic easing out
72
- * @method easeOutQuart
73
65
  * @memberOf fabric.util.ease
74
66
  */
75
67
  function easeOutQuart(t, b, c, d) {
@@ -78,7 +70,6 @@
78
70
 
79
71
  /**
80
72
  * Quartic easing in and out
81
- * @method easeInOutQuart
82
73
  * @memberOf fabric.util.ease
83
74
  */
84
75
  function easeInOutQuart(t, b, c, d) {
@@ -89,7 +80,6 @@
89
80
 
90
81
  /**
91
82
  * Quintic easing in
92
- * @method easeInQuint
93
83
  * @memberOf fabric.util.ease
94
84
  */
95
85
  function easeInQuint(t, b, c, d) {
@@ -98,7 +88,6 @@
98
88
 
99
89
  /**
100
90
  * Quintic easing out
101
- * @method easeOutQuint
102
91
  * @memberOf fabric.util.ease
103
92
  */
104
93
  function easeOutQuint(t, b, c, d) {
@@ -107,7 +96,6 @@
107
96
 
108
97
  /**
109
98
  * Quintic easing in and out
110
- * @method easeInOutQuint
111
99
  * @memberOf fabric.util.ease
112
100
  */
113
101
  function easeInOutQuint(t, b, c, d) {
@@ -118,7 +106,6 @@
118
106
 
119
107
  /**
120
108
  * Sinusoidal easing in
121
- * @method easeInSine
122
109
  * @memberOf fabric.util.ease
123
110
  */
124
111
  function easeInSine(t, b, c, d) {
@@ -127,7 +114,6 @@
127
114
 
128
115
  /**
129
116
  * Sinusoidal easing out
130
- * @method easeOutSine
131
117
  * @memberOf fabric.util.ease
132
118
  */
133
119
  function easeOutSine(t, b, c, d) {
@@ -136,7 +122,6 @@
136
122
 
137
123
  /**
138
124
  * Sinusoidal easing in and out
139
- * @method easeInOutSine
140
125
  * @memberOf fabric.util.ease
141
126
  */
142
127
  function easeInOutSine(t, b, c, d) {
@@ -145,7 +130,6 @@
145
130
 
146
131
  /**
147
132
  * Exponential easing in
148
- * @method easeInExpo
149
133
  * @memberOf fabric.util.ease
150
134
  */
151
135
  function easeInExpo(t, b, c, d) {
@@ -154,7 +138,6 @@
154
138
 
155
139
  /**
156
140
  * Exponential easing out
157
- * @method easeOutExpo
158
141
  * @memberOf fabric.util.ease
159
142
  */
160
143
  function easeOutExpo(t, b, c, d) {
@@ -163,7 +146,6 @@
163
146
 
164
147
  /**
165
148
  * Exponential easing in and out
166
- * @method easeInOutExpo
167
149
  * @memberOf fabric.util.ease
168
150
  */
169
151
  function easeInOutExpo(t, b, c, d) {
@@ -176,7 +158,6 @@
176
158
 
177
159
  /**
178
160
  * Circular easing in
179
- * @method easeInCirc
180
161
  * @memberOf fabric.util.ease
181
162
  */
182
163
  function easeInCirc(t, b, c, d) {
@@ -185,7 +166,6 @@
185
166
 
186
167
  /**
187
168
  * Circular easing out
188
- * @method easeOutCirc
189
169
  * @memberOf fabric.util.ease
190
170
  */
191
171
  function easeOutCirc(t, b, c, d) {
@@ -194,7 +174,6 @@
194
174
 
195
175
  /**
196
176
  * Circular easing in and out
197
- * @method easeInOutCirc
198
177
  * @memberOf fabric.util.ease
199
178
  */
200
179
  function easeInOutCirc(t, b, c, d) {
@@ -205,7 +184,6 @@
205
184
 
206
185
  /**
207
186
  * Elastic easing in
208
- * @method easeInElastic
209
187
  * @memberOf fabric.util.ease
210
188
  */
211
189
  function easeInElastic(t, b, c, d) {
@@ -221,7 +199,6 @@
221
199
 
222
200
  /**
223
201
  * Elastic easing out
224
- * @method easeOutElastic
225
202
  * @memberOf fabric.util.ease
226
203
  */
227
204
  function easeOutElastic(t, b, c, d) {
@@ -237,7 +214,6 @@
237
214
 
238
215
  /**
239
216
  * Elastic easing in and out
240
- * @method easeInOutElastic
241
217
  * @memberOf fabric.util.ease
242
218
  */
243
219
  function easeInOutElastic(t, b, c, d) {
@@ -254,7 +230,6 @@
254
230
 
255
231
  /**
256
232
  * Backwards easing in
257
- * @method easeInBack
258
233
  * @memberOf fabric.util.ease
259
234
  */
260
235
  function easeInBack(t, b, c, d, s) {
@@ -264,7 +239,6 @@
264
239
 
265
240
  /**
266
241
  * Backwards easing out
267
- * @method easeOutBack
268
242
  * @memberOf fabric.util.ease
269
243
  */
270
244
  function easeOutBack(t, b, c, d, s) {
@@ -274,7 +248,6 @@
274
248
 
275
249
  /**
276
250
  * Backwards easing in and out
277
- * @method easeInOutBack
278
251
  * @memberOf fabric.util.ease
279
252
  */
280
253
  function easeInOutBack(t, b, c, d, s) {
@@ -286,7 +259,6 @@
286
259
 
287
260
  /**
288
261
  * Bouncing easing in
289
- * @method easeInBounce
290
262
  * @memberOf fabric.util.ease
291
263
  */
292
264
  function easeInBounce(t, b, c, d) {
@@ -295,7 +267,6 @@
295
267
 
296
268
  /**
297
269
  * Bouncing easing out
298
- * @method easeOutBounce
299
270
  * @memberOf fabric.util.ease
300
271
  */
301
272
  function easeOutBounce(t, b, c, d) {
@@ -312,7 +283,6 @@
312
283
 
313
284
  /**
314
285
  * Bouncing easing in and out
315
- * @method easeInOutBounce
316
286
  * @memberOf fabric.util.ease
317
287
  */
318
288
  function easeInOutBounce(t, b, c, d) {
@@ -321,6 +291,7 @@
321
291
  }
322
292
 
323
293
  /**
294
+ * Easing functions
324
295
  * See <a href="http://gizma.com/easing/">Easing Equations by Robert Penner</a>
325
296
  * @namespace fabric.util.ease
326
297
  */
@@ -357,4 +328,4 @@
357
328
  easeInOutBounce: easeInOutBounce
358
329
  };
359
330
 
360
- }());
331
+ }());
@@ -169,7 +169,6 @@
169
169
 
170
170
  /**
171
171
  * Cross-browser wrapper for getting event's coordinates
172
- * @method getPointer
173
172
  * @memberOf fabric.util
174
173
  * @param {Event} event
175
174
  * @param {HTMLCanvasElement} upperCanvasEl &lt;canvas> element on which object selection is drawn
@@ -188,13 +187,18 @@
188
187
  while (element && element.parentNode && !firstFixedAncestor) {
189
188
  element = element.parentNode;
190
189
 
191
- if (element !== fabric.document && fabric.util.getElementPosition(element) === 'fixed') firstFixedAncestor = element;
190
+ if (element !== fabric.document &&
191
+ fabric.util.getElementStyle(element, 'position') === 'fixed') {
192
+ firstFixedAncestor = element;
193
+ }
192
194
 
193
- if (element !== fabric.document && orgElement !== upperCanvasEl && fabric.util.getElementPosition(element) === 'absolute') {
195
+ if (element !== fabric.document &&
196
+ orgElement !== upperCanvasEl &&
197
+ fabric.util.getElementStyle(element, 'position') === 'absolute') {
194
198
  scrollLeft = 0;
195
199
  scrollTop = 0;
196
200
  }
197
- else if (element === fabric.document && orgElement !== upperCanvasEl) {
201
+ else if (element === fabric.document) {
198
202
  scrollLeft = body.scrollLeft || docElement.scrollLeft || 0;
199
203
  scrollTop = body.scrollTop || docElement.scrollTop || 0;
200
204
  }
@@ -223,10 +227,20 @@
223
227
 
224
228
  if (fabric.isTouchSupported) {
225
229
  pointerX = function(event) {
226
- return (event.touches && event.touches[0] ? (event.touches[0].pageX - (event.touches[0].pageX - event.touches[0].clientX)) || event.clientX : event.clientX);
230
+ if (event.type !== 'touchend') {
231
+ return (event.touches && event.touches[0] ?
232
+ (event.touches[0].pageX - (event.touches[0].pageX - event.touches[0].clientX)) || event.clientX : event.clientX);
233
+ }
234
+ return (event.changedTouches && event.changedTouches[0]
235
+ ? (event.changedTouches[0].pageX - (event.changedTouches[0].pageX - event.changedTouches[0].clientX)) || event.clientX : event.clientX);
227
236
  };
228
237
  pointerY = function(event) {
229
- return (event.touches && event.touches[0] ? (event.touches[0].pageY - (event.touches[0].pageY - event.touches[0].clientY)) || event.clientY : event.clientY);
238
+ if (event.type !== 'touchend') {
239
+ return (event.touches && event.touches[0]
240
+ ? (event.touches[0].pageY - (event.touches[0].pageY - event.touches[0].clientY)) || event.clientY : event.clientY);
241
+ }
242
+ return (event.changedTouches && event.changedTouches[0]
243
+ ? (event.changedTouches[0].pageY - (event.changedTouches[0].pageY - event.changedTouches[0].clientY)) || event.clientY : event.clientY);
230
244
  };
231
245
  }
232
246
 
@@ -234,4 +248,4 @@
234
248
 
235
249
  fabric.util.object.extend(fabric.util, fabric.Observable);
236
250
 
237
- })();
251
+ })();
@@ -4,7 +4,6 @@
4
4
 
5
5
  /**
6
6
  * Takes id and returns an element with that id (if one exists in a document)
7
- * @method getById
8
7
  * @memberOf fabric.util
9
8
  * @param {String|HTMLElement} id
10
9
  * @return {HTMLElement|null}
@@ -15,7 +14,6 @@
15
14
 
16
15
  /**
17
16
  * Converts an array-like object (e.g. arguments or NodeList) to an array
18
- * @method toArray
19
17
  * @memberOf fabric.util
20
18
  * @param {Object} arrayLike
21
19
  * @return {Array}
@@ -42,7 +40,6 @@
42
40
 
43
41
  /**
44
42
  * Creates specified element with specified attributes
45
- * @method makeElement
46
43
  * @memberOf fabric.util
47
44
  * @param {String} tagName Type of an element to create
48
45
  * @param {Object} [attributes] Attributes to set on an element
@@ -66,7 +63,6 @@
66
63
 
67
64
  /**
68
65
  * Adds class to an element
69
- * @method addClass
70
66
  * @memberOf fabric.util
71
67
  * @param {HTMLElement} element Element to add class to
72
68
  * @param {String} className Class to add to an element
@@ -79,7 +75,6 @@
79
75
 
80
76
  /**
81
77
  * Wraps element with another element
82
- * @method wrapElement
83
78
  * @memberOf fabric.util
84
79
  * @param {HTMLElement} element Element to wrap
85
80
  * @param {HTMLElement|String} wrapper Element to wrap with
@@ -99,45 +94,66 @@
99
94
 
100
95
  /**
101
96
  * Returns offset for a given element
102
- * @method getElementOffset
103
97
  * @function
104
98
  * @memberOf fabric.util
105
99
  * @param {HTMLElement} element Element to get offset for
106
100
  * @return {Object} Object with "left" and "top" properties
107
101
  */
108
102
  function getElementOffset(element) {
109
- // TODO (kangax): need to fix this method
110
- var valueT = 0, valueL = 0;
111
- do {
112
- valueT += element.offsetTop || 0;
113
- valueL += element.offsetLeft || 0;
114
- element = element.offsetParent;
103
+ var docElem, win,
104
+ box = {left: 0, top: 0},
105
+ doc = element && element.ownerDocument,
106
+ offset = {left: 0, top: 0},
107
+ offsetAttributes = {
108
+ 'borderLeftWidth': 'left',
109
+ 'borderTopWidth': 'top',
110
+ 'paddingLeft': 'left',
111
+ 'paddingTop': 'top'
112
+ };
113
+
114
+ if (!doc){
115
+ return {left: 0, top: 0};
115
116
  }
116
- while (element);
117
- return ({ left: valueL, top: valueT });
117
+
118
+ for (var attr in offsetAttributes) {
119
+ offset[offsetAttributes[attr]] += parseInt(getElementStyle(element, attr), 10) || 0;
120
+ }
121
+
122
+ docElem = doc.documentElement;
123
+ if ( typeof element.getBoundingClientRect !== "undefined" ) {
124
+ box = element.getBoundingClientRect();
125
+ }
126
+ if(doc != null && doc === doc.window){
127
+ win = doc;
128
+ } else {
129
+ win = doc.nodeType === 9 && (doc.defaultView || doc.parentWindow);
130
+ }
131
+ return {
132
+ left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0) + offset.left,
133
+ top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0) + offset.top
134
+ };
118
135
  }
119
136
 
120
137
  /**
121
- * Returns position of a given element
122
- * @method getElementPosition
123
- * @function
138
+ * Returns style attribute value of a given element
124
139
  * @memberOf fabric.util
125
- * @param {HTMLElement} element Element to get offset for
126
- * @return {Object} position of the given element.
140
+ * @param {HTMLElement} element Element to get style attribute for
141
+ * @param {String} attr Style attribute to get for element
142
+ * @return {String} Style attribute value of the given element.
127
143
  */
128
- var getElementPosition;
129
- if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
130
- getElementPosition = function (element) {
131
- return fabric.document.defaultView.getComputedStyle(element, null).position;
132
- };
133
- }
134
- else {
135
- /** @ignore */
136
- getElementPosition = function (element) {
137
- var value = element.style.position;
138
- if (!value && element.currentStyle) value = element.currentStyle.position;
144
+ function getElementStyle(element, attr) {
145
+ if (!element.style) {
146
+ element.style = { };
147
+ }
148
+
149
+ if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
150
+ return fabric.document.defaultView.getComputedStyle(element, null)[attr];
151
+ }
152
+ else {
153
+ var value = element.style[attr];
154
+ if (!value && element.currentStyle) value = element.currentStyle[attr];
139
155
  return value;
140
- };
156
+ }
141
157
  }
142
158
 
143
159
  (function () {
@@ -155,7 +171,6 @@
155
171
 
156
172
  /**
157
173
  * Makes element unselectable
158
- * @method makeElementUnselectable
159
174
  * @memberOf fabric.util
160
175
  * @param {HTMLElement} element Element to make unselectable
161
176
  * @return {HTMLElement} Element that was passed in
@@ -175,7 +190,6 @@
175
190
 
176
191
  /**
177
192
  * Makes element selectable
178
- * @method makeElementSelectable
179
193
  * @memberOf fabric.util
180
194
  * @param {HTMLElement} element Element to make selectable
181
195
  * @return {HTMLElement} Element that was passed in
@@ -201,7 +215,6 @@
201
215
 
202
216
  /**
203
217
  * Inserts a script element with a given url into a document; invokes callback, when that script is finished loading
204
- * @method getScript
205
218
  * @memberOf fabric.util
206
219
  * @param {String} url URL of a script to load
207
220
  * @param {Function} callback Callback to execute when script is finished loading
@@ -211,9 +224,6 @@
211
224
  scriptEl = fabric.document.createElement('script'),
212
225
  loading = true;
213
226
 
214
- scriptEl.type = 'text/javascript';
215
- scriptEl.setAttribute('runat', 'server');
216
-
217
227
  /** @ignore */
218
228
  scriptEl.onload = /** @ignore */ scriptEl.onreadystatechange = function(e) {
219
229
  if (loading) {
@@ -240,6 +250,6 @@
240
250
  fabric.util.addClass = addClass;
241
251
  fabric.util.wrapElement = wrapElement;
242
252
  fabric.util.getElementOffset = getElementOffset;
243
- fabric.util.getElementPosition = getElementPosition;
253
+ fabric.util.getElementStyle = getElementStyle;
244
254
 
245
- })();
255
+ })();