fabricjs-rails 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.idea/fabricjs-rails.iml +0 -2
- data/.idea/workspace.xml +72 -44
- data/fabricjs-rails.gemspec +1 -1
- data/lib/fabricjs/rails/version.rb +1 -1
- data/vendor/.DS_Store +0 -0
- data/vendor/assets/.DS_Store +0 -0
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/fabric.js +1 -188
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d3627e03ae0240f310c2d38a5a75c255d4a3d75
|
4
|
+
data.tar.gz: 0dcfd6df5d1a972c136f279f3395eeacafb4caf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4da60478a9578466b047d3d2f3c6ade83c316946e63e875df02419fc7deb6e40682323de933cdf9030bf24ddaa45451b84f353bd9e8acb57251cd3ce71eabaf0
|
7
|
+
data.tar.gz: 39c5cc4681ff6d6d3f896cc85af6e3bbc6c8b789511d2bad8d33c97859ac53892b90f19797df46ec578b397969e2f88d3d623c02eec915c79bd873008fcde67a
|
data/.DS_Store
ADDED
Binary file
|
data/.idea/fabricjs-rails.iml
CHANGED
@@ -13,8 +13,6 @@
|
|
13
13
|
<content url="file://$MODULE_DIR$" />
|
14
14
|
<orderEntry type="inheritedJdk" />
|
15
15
|
<orderEntry type="sourceFolder" forTests="false" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.5, RVM: ruby-2.0.0-p0) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v10.1.0, RVM: ruby-2.0.0-p0) [gem]" level="application" />
|
18
16
|
</component>
|
19
17
|
</module>
|
20
18
|
|
data/.idea/workspace.xml
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
|
-
<list default="true" id="c2350f23-2d8f-4cdc-af5d-d16baba26aa7" name="Default" comment=""
|
4
|
+
<list default="true" id="c2350f23-2d8f-4cdc-af5d-d16baba26aa7" name="Default" comment="">
|
5
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/fabricjs-rails.gemspec" afterPath="$PROJECT_DIR$/fabricjs-rails.gemspec" />
|
6
|
+
</list>
|
5
7
|
<ignored path="fabricjs-rails.iws" />
|
6
8
|
<ignored path=".idea/workspace.xml" />
|
7
|
-
<file path="/Dummy.txt" changelist="c2350f23-2d8f-4cdc-af5d-d16baba26aa7" time="
|
9
|
+
<file path="/Dummy.txt" changelist="c2350f23-2d8f-4cdc-af5d-d16baba26aa7" time="1385226368281" ignored="false" />
|
8
10
|
<file path="/fabricjs-rails.gemspec" changelist="c2350f23-2d8f-4cdc-af5d-d16baba26aa7" time="1382723783193" ignored="false" />
|
9
11
|
<option name="TRACKING_ENABLED" value="true" />
|
10
12
|
<option name="SHOW_DIALOG" value="false" />
|
@@ -25,19 +27,19 @@
|
|
25
27
|
</component>
|
26
28
|
<component name="FileEditorManager">
|
27
29
|
<leaf>
|
28
|
-
<file leaf-file-name="fabricjs-rails.gemspec" pinned="false" current="
|
30
|
+
<file leaf-file-name="fabricjs-rails.gemspec" pinned="false" current="true" current-in-tab="true">
|
29
31
|
<entry file="file://$PROJECT_DIR$/fabricjs-rails.gemspec">
|
30
32
|
<provider selected="true" editor-type-id="text-editor">
|
31
|
-
<state line="
|
33
|
+
<state line="10" column="175" selection-start="386" selection-end="534" vertical-scroll-proportion="0.24834438">
|
32
34
|
<folding />
|
33
35
|
</state>
|
34
36
|
</provider>
|
35
37
|
</entry>
|
36
38
|
</file>
|
37
|
-
<file leaf-file-name="rails.rb" pinned="false" current="
|
39
|
+
<file leaf-file-name="rails.rb" pinned="false" current="false" current-in-tab="false">
|
38
40
|
<entry file="file://$PROJECT_DIR$/lib/fabricjs/rails.rb">
|
39
41
|
<provider selected="true" editor-type-id="text-editor">
|
40
|
-
<state line="8" column="38" selection-start="118" selection-end="118" vertical-scroll-proportion="0.
|
42
|
+
<state line="8" column="38" selection-start="118" selection-end="118" vertical-scroll-proportion="0.0">
|
41
43
|
<folding />
|
42
44
|
</state>
|
43
45
|
</provider>
|
@@ -46,7 +48,7 @@
|
|
46
48
|
<file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
|
47
49
|
<entry file="file://$PROJECT_DIR$/lib/fabricjs/rails/version.rb">
|
48
50
|
<provider selected="true" editor-type-id="text-editor">
|
49
|
-
<state line="
|
51
|
+
<state line="2" column="16" selection-start="47" selection-end="47" vertical-scroll-proportion="0.0">
|
50
52
|
<folding />
|
51
53
|
</state>
|
52
54
|
</provider>
|
@@ -79,15 +81,6 @@
|
|
79
81
|
</provider>
|
80
82
|
</entry>
|
81
83
|
</file>
|
82
|
-
<file leaf-file-name="Gemfile.lock" pinned="false" current="false" current-in-tab="false">
|
83
|
-
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
84
|
-
<provider selected="true" editor-type-id="text-editor">
|
85
|
-
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
86
|
-
<folding />
|
87
|
-
</state>
|
88
|
-
</provider>
|
89
|
-
</entry>
|
90
|
-
</file>
|
91
84
|
</leaf>
|
92
85
|
</component>
|
93
86
|
<component name="FindManager">
|
@@ -107,16 +100,16 @@
|
|
107
100
|
<option name="changedFiles">
|
108
101
|
<list>
|
109
102
|
<option value="$PROJECT_DIR$/lib/fabricjs/rails.rb" />
|
110
|
-
<option value="$PROJECT_DIR$/fabricjs-rails.gemspec" />
|
111
103
|
<option value="$PROJECT_DIR$/lib/fabricjs/rails/version.rb" />
|
104
|
+
<option value="$PROJECT_DIR$/fabricjs-rails.gemspec" />
|
112
105
|
</list>
|
113
106
|
</option>
|
114
107
|
</component>
|
115
108
|
<component name="ProjectFrameBounds">
|
116
|
-
<option name="x" value="
|
117
|
-
<option name="y" value="
|
118
|
-
<option name="width" value="
|
119
|
-
<option name="height" value="
|
109
|
+
<option name="x" value="-24" />
|
110
|
+
<option name="y" value="28" />
|
111
|
+
<option name="width" value="1280" />
|
112
|
+
<option name="height" value="742" />
|
120
113
|
</component>
|
121
114
|
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
122
115
|
<OptionsSetting value="true" id="Add" />
|
@@ -144,7 +137,6 @@
|
|
144
137
|
<sortByType />
|
145
138
|
</navigator>
|
146
139
|
<panes>
|
147
|
-
<pane id="Scope" />
|
148
140
|
<pane id="ProjectPane">
|
149
141
|
<subPane>
|
150
142
|
<PATH>
|
@@ -159,7 +151,7 @@
|
|
159
151
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
160
152
|
</PATH_ELEMENT>
|
161
153
|
<PATH_ELEMENT>
|
162
|
-
<option name="myItemId" value="fabricjs
|
154
|
+
<option name="myItemId" value="fabricjs" />
|
163
155
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
164
156
|
</PATH_ELEMENT>
|
165
157
|
</PATH>
|
@@ -169,7 +161,7 @@
|
|
169
161
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
170
162
|
</PATH_ELEMENT>
|
171
163
|
<PATH_ELEMENT>
|
172
|
-
<option name="myItemId" value="fabricjs
|
164
|
+
<option name="myItemId" value="fabricjs" />
|
173
165
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
174
166
|
</PATH_ELEMENT>
|
175
167
|
<PATH_ELEMENT>
|
@@ -191,7 +183,7 @@
|
|
191
183
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
192
184
|
</PATH_ELEMENT>
|
193
185
|
<PATH_ELEMENT>
|
194
|
-
<option name="myItemId" value="fabricjs
|
186
|
+
<option name="myItemId" value="fabricjs" />
|
195
187
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
196
188
|
</PATH_ELEMENT>
|
197
189
|
<PATH_ELEMENT>
|
@@ -209,7 +201,7 @@
|
|
209
201
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
210
202
|
</PATH_ELEMENT>
|
211
203
|
<PATH_ELEMENT>
|
212
|
-
<option name="myItemId" value="fabricjs
|
204
|
+
<option name="myItemId" value="fabricjs" />
|
213
205
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
214
206
|
</PATH_ELEMENT>
|
215
207
|
<PATH_ELEMENT>
|
@@ -227,6 +219,7 @@
|
|
227
219
|
</PATH>
|
228
220
|
</subPane>
|
229
221
|
</pane>
|
222
|
+
<pane id="Scope" />
|
230
223
|
</panes>
|
231
224
|
</component>
|
232
225
|
<component name="PropertiesComponent">
|
@@ -342,26 +335,26 @@
|
|
342
335
|
<servers />
|
343
336
|
</component>
|
344
337
|
<component name="ToolWindowManager">
|
345
|
-
<frame x="
|
338
|
+
<frame x="-24" y="28" width="1280" height="742" extended-state="6" />
|
346
339
|
<editor active="true" />
|
347
340
|
<layout>
|
348
|
-
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
341
|
+
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
349
342
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
350
|
-
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
343
|
+
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
351
344
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
352
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
345
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28200972" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
353
346
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
354
|
-
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
355
|
-
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
347
|
+
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
348
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
356
349
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
357
|
-
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
350
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
358
351
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
359
352
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
360
|
-
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
361
353
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
354
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
362
355
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
363
|
-
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
364
356
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
357
|
+
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
365
358
|
</layout>
|
366
359
|
</component>
|
367
360
|
<component name="VcsContentAnnotationSettings">
|
@@ -425,16 +418,23 @@
|
|
425
418
|
<breakpoint-manager />
|
426
419
|
</component>
|
427
420
|
<component name="editorHistoryManager">
|
428
|
-
<entry file="file://$PROJECT_DIR$/
|
421
|
+
<entry file="file://$PROJECT_DIR$/fabricjs-rails.gemspec">
|
429
422
|
<provider selected="true" editor-type-id="text-editor">
|
430
|
-
<state line="
|
423
|
+
<state line="11" column="25" selection-start="584" selection-end="584" vertical-scroll-proportion="0.0">
|
431
424
|
<folding />
|
432
425
|
</state>
|
433
426
|
</provider>
|
434
427
|
</entry>
|
435
|
-
<entry file="file://$PROJECT_DIR$/
|
428
|
+
<entry file="file://$PROJECT_DIR$/lib/fabricjs/rails.rb">
|
436
429
|
<provider selected="true" editor-type-id="text-editor">
|
437
|
-
<state line="
|
430
|
+
<state line="8" column="38" selection-start="118" selection-end="118" vertical-scroll-proportion="0.0">
|
431
|
+
<folding />
|
432
|
+
</state>
|
433
|
+
</provider>
|
434
|
+
</entry>
|
435
|
+
<entry file="file://$PROJECT_DIR$/lib/fabricjs/rails/version.rb">
|
436
|
+
<provider selected="true" editor-type-id="text-editor">
|
437
|
+
<state line="2" column="20" selection-start="51" selection-end="51" vertical-scroll-proportion="0.0">
|
438
438
|
<folding />
|
439
439
|
</state>
|
440
440
|
</provider>
|
@@ -453,23 +453,51 @@
|
|
453
453
|
</state>
|
454
454
|
</provider>
|
455
455
|
</entry>
|
456
|
-
<entry file="file://$PROJECT_DIR$/
|
456
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
457
457
|
<provider selected="true" editor-type-id="text-editor">
|
458
|
-
<state line="
|
458
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
459
459
|
<folding />
|
460
460
|
</state>
|
461
461
|
</provider>
|
462
462
|
</entry>
|
463
|
-
<entry file="file://$PROJECT_DIR$/
|
463
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
464
464
|
<provider selected="true" editor-type-id="text-editor">
|
465
|
-
<state line="
|
465
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
466
|
+
<folding />
|
467
|
+
</state>
|
468
|
+
</provider>
|
469
|
+
</entry>
|
470
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
471
|
+
<provider selected="true" editor-type-id="text-editor">
|
472
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
466
473
|
<folding />
|
467
474
|
</state>
|
468
475
|
</provider>
|
469
476
|
</entry>
|
470
477
|
<entry file="file://$PROJECT_DIR$/lib/fabricjs/rails.rb">
|
471
478
|
<provider selected="true" editor-type-id="text-editor">
|
472
|
-
<state line="8" column="38" selection-start="118" selection-end="118" vertical-scroll-proportion="0.
|
479
|
+
<state line="8" column="38" selection-start="118" selection-end="118" vertical-scroll-proportion="0.0">
|
480
|
+
<folding />
|
481
|
+
</state>
|
482
|
+
</provider>
|
483
|
+
</entry>
|
484
|
+
<entry file="file://$PROJECT_DIR$/lib/fabricjs/rails/version.rb">
|
485
|
+
<provider selected="true" editor-type-id="text-editor">
|
486
|
+
<state line="2" column="16" selection-start="47" selection-end="47" vertical-scroll-proportion="0.0">
|
487
|
+
<folding />
|
488
|
+
</state>
|
489
|
+
</provider>
|
490
|
+
</entry>
|
491
|
+
<entry file="file://$PROJECT_DIR$/vendor/assets/javascripts/fabric.js">
|
492
|
+
<provider selected="true" editor-type-id="text-editor">
|
493
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
494
|
+
<folding />
|
495
|
+
</state>
|
496
|
+
</provider>
|
497
|
+
</entry>
|
498
|
+
<entry file="file://$PROJECT_DIR$/fabricjs-rails.gemspec">
|
499
|
+
<provider selected="true" editor-type-id="text-editor">
|
500
|
+
<state line="10" column="175" selection-start="386" selection-end="534" vertical-scroll-proportion="0.24834438">
|
473
501
|
<folding />
|
474
502
|
</state>
|
475
503
|
</provider>
|
data/fabricjs-rails.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Fabricjs::Rails::VERSION
|
9
9
|
spec.authors = ["Arun Subramanian"]
|
10
10
|
spec.email = ["gth824c@yahoo.com"]
|
11
|
-
spec.description = %q{ Allows text,cufon,gestures,easing,parser,freedrawing,interaction,serialization,image_filters,gradient,pattern,shadow
|
11
|
+
spec.description = %q{ Allows text,cufon,gestures,easing,parser,freedrawing,interaction,serialization,image_filters,gradient,pattern,shadow on HTML5 canvas with FabricJs.}
|
12
12
|
spec.summary = %q{ Contains FabricJS with all the features selected from the custom build. }
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
data/vendor/.DS_Store
ADDED
Binary file
|
Binary file
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* build: `node build.js modules=text,cufon,gestures,easing,parser,freedrawing,interaction,serialization,image_filters,gradient,pattern,shadow
|
1
|
+
/* build: `node build.js modules=text,cufon,gestures,easing,parser,freedrawing,interaction,serialization,image_filters,gradient,pattern,shadow` */
|
2
2
|
/*! Fabric.js Copyright 2008-2013, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
3
3
|
|
4
4
|
var exports = exports || {};
|
@@ -20167,190 +20167,3 @@ fabric.util.object.extend(fabric.Text.prototype, {
|
|
20167
20167
|
return el;
|
20168
20168
|
}
|
20169
20169
|
});
|
20170
|
-
(function() {
|
20171
|
-
|
20172
|
-
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
|
20173
|
-
return;
|
20174
|
-
}
|
20175
|
-
|
20176
|
-
var DOMParser = new require('xmldom').DOMParser,
|
20177
|
-
URL = require('url'),
|
20178
|
-
HTTP = require('http'),
|
20179
|
-
HTTPS = require('https'),
|
20180
|
-
|
20181
|
-
Canvas = require('canvas'),
|
20182
|
-
Image = require('canvas').Image;
|
20183
|
-
|
20184
|
-
/** @private */
|
20185
|
-
function request(url, encoding, callback) {
|
20186
|
-
var oURL = URL.parse(url);
|
20187
|
-
|
20188
|
-
// detect if http or https is used
|
20189
|
-
if ( !oURL.port ) {
|
20190
|
-
oURL.port = ( oURL.protocol.indexOf('https:') === 0 ) ? 443 : 80;
|
20191
|
-
}
|
20192
|
-
|
20193
|
-
// assign request handler based on protocol
|
20194
|
-
var reqHandler = ( oURL.port === 443 ) ? HTTPS : HTTP;
|
20195
|
-
|
20196
|
-
var req = reqHandler.request({
|
20197
|
-
hostname: oURL.hostname,
|
20198
|
-
port: oURL.port,
|
20199
|
-
path: oURL.path,
|
20200
|
-
method: 'GET'
|
20201
|
-
}, function(response){
|
20202
|
-
var body = "";
|
20203
|
-
if (encoding) {
|
20204
|
-
response.setEncoding(encoding);
|
20205
|
-
}
|
20206
|
-
response.on('end', function () {
|
20207
|
-
callback(body);
|
20208
|
-
});
|
20209
|
-
response.on('data', function (chunk) {
|
20210
|
-
if (response.statusCode === 200) {
|
20211
|
-
body += chunk;
|
20212
|
-
}
|
20213
|
-
});
|
20214
|
-
});
|
20215
|
-
|
20216
|
-
req.on('error', function(err) {
|
20217
|
-
if (err.errno === process.ECONNREFUSED) {
|
20218
|
-
fabric.log('ECONNREFUSED: connection refused to ' + oURL.hostname + ':' + oURL.port);
|
20219
|
-
}
|
20220
|
-
else {
|
20221
|
-
fabric.log(err.message);
|
20222
|
-
}
|
20223
|
-
});
|
20224
|
-
|
20225
|
-
req.end();
|
20226
|
-
}
|
20227
|
-
|
20228
|
-
/** @private */
|
20229
|
-
function request_fs(path, callback){
|
20230
|
-
var fs = require('fs');
|
20231
|
-
fs.readFile(path, function (err, data) {
|
20232
|
-
if (err) {
|
20233
|
-
fabric.log(err);
|
20234
|
-
throw err;
|
20235
|
-
} else {
|
20236
|
-
callback(data);
|
20237
|
-
}
|
20238
|
-
});
|
20239
|
-
}
|
20240
|
-
|
20241
|
-
fabric.util.loadImage = function(url, callback, context) {
|
20242
|
-
var createImageAndCallBack = function(data){
|
20243
|
-
img.src = new Buffer(data, 'binary');
|
20244
|
-
// preserving original url, which seems to be lost in node-canvas
|
20245
|
-
img._src = url;
|
20246
|
-
callback && callback.call(context, img);
|
20247
|
-
};
|
20248
|
-
var img = new Image();
|
20249
|
-
if (url && (url instanceof Buffer || url.indexOf('data') === 0)) {
|
20250
|
-
img.src = img._src = url;
|
20251
|
-
callback && callback.call(context, img);
|
20252
|
-
}
|
20253
|
-
else if (url && url.indexOf('http') !== 0) {
|
20254
|
-
request_fs(url, createImageAndCallBack);
|
20255
|
-
}
|
20256
|
-
else if (url) {
|
20257
|
-
request(url, 'binary', createImageAndCallBack);
|
20258
|
-
}
|
20259
|
-
};
|
20260
|
-
|
20261
|
-
fabric.loadSVGFromURL = function(url, callback, reviver) {
|
20262
|
-
url = url.replace(/^\n\s*/, '').replace(/\?.*$/, '').trim();
|
20263
|
-
if (url.indexOf('http') !== 0) {
|
20264
|
-
request_fs(url, function(body) {
|
20265
|
-
fabric.loadSVGFromString(body, callback, reviver);
|
20266
|
-
});
|
20267
|
-
}
|
20268
|
-
else {
|
20269
|
-
request(url, '', function(body) {
|
20270
|
-
fabric.loadSVGFromString(body, callback, reviver);
|
20271
|
-
});
|
20272
|
-
}
|
20273
|
-
};
|
20274
|
-
|
20275
|
-
fabric.loadSVGFromString = function(string, callback, reviver) {
|
20276
|
-
var doc = new DOMParser().parseFromString(string);
|
20277
|
-
fabric.parseSVGDocument(doc.documentElement, function(results, options) {
|
20278
|
-
callback && callback(results, options);
|
20279
|
-
}, reviver);
|
20280
|
-
};
|
20281
|
-
|
20282
|
-
fabric.util.getScript = function(url, callback) {
|
20283
|
-
request(url, '', function(body) {
|
20284
|
-
eval(body);
|
20285
|
-
callback && callback();
|
20286
|
-
});
|
20287
|
-
};
|
20288
|
-
|
20289
|
-
fabric.Image.fromObject = function(object, callback) {
|
20290
|
-
fabric.util.loadImage(object.src, function(img) {
|
20291
|
-
var oImg = new fabric.Image(img);
|
20292
|
-
|
20293
|
-
oImg._initConfig(object);
|
20294
|
-
oImg._initFilters(object, function(filters) {
|
20295
|
-
oImg.filters = filters || [ ];
|
20296
|
-
callback && callback(oImg);
|
20297
|
-
});
|
20298
|
-
});
|
20299
|
-
};
|
20300
|
-
|
20301
|
-
/**
|
20302
|
-
* Only available when running fabric on node.js
|
20303
|
-
* @param width Canvas width
|
20304
|
-
* @param height Canvas height
|
20305
|
-
* @return {Object} wrapped canvas instance
|
20306
|
-
*/
|
20307
|
-
fabric.createCanvasForNode = function(width, height) {
|
20308
|
-
|
20309
|
-
var canvasEl = fabric.document.createElement('canvas'),
|
20310
|
-
nodeCanvas = new Canvas(width || 600, height || 600);
|
20311
|
-
|
20312
|
-
// jsdom doesn't create style on canvas element, so here be temp. workaround
|
20313
|
-
canvasEl.style = { };
|
20314
|
-
|
20315
|
-
canvasEl.width = nodeCanvas.width;
|
20316
|
-
canvasEl.height = nodeCanvas.height;
|
20317
|
-
|
20318
|
-
var FabricCanvas = fabric.Canvas || fabric.StaticCanvas;
|
20319
|
-
var fabricCanvas = new FabricCanvas(canvasEl);
|
20320
|
-
fabricCanvas.contextContainer = nodeCanvas.getContext('2d');
|
20321
|
-
fabricCanvas.nodeCanvas = nodeCanvas;
|
20322
|
-
fabricCanvas.Font = Canvas.Font;
|
20323
|
-
|
20324
|
-
return fabricCanvas;
|
20325
|
-
};
|
20326
|
-
|
20327
|
-
/** @ignore */
|
20328
|
-
fabric.StaticCanvas.prototype.createPNGStream = function() {
|
20329
|
-
return this.nodeCanvas.createPNGStream();
|
20330
|
-
};
|
20331
|
-
|
20332
|
-
fabric.StaticCanvas.prototype.createJPEGStream = function(opts) {
|
20333
|
-
return this.nodeCanvas.createJPEGStream(opts);
|
20334
|
-
};
|
20335
|
-
|
20336
|
-
var origSetWidth = fabric.StaticCanvas.prototype.setWidth;
|
20337
|
-
fabric.StaticCanvas.prototype.setWidth = function(width) {
|
20338
|
-
origSetWidth.call(this, width);
|
20339
|
-
this.nodeCanvas.width = width;
|
20340
|
-
return this;
|
20341
|
-
};
|
20342
|
-
if (fabric.Canvas) {
|
20343
|
-
fabric.Canvas.prototype.setWidth = fabric.StaticCanvas.prototype.setWidth;
|
20344
|
-
}
|
20345
|
-
|
20346
|
-
var origSetHeight = fabric.StaticCanvas.prototype.setHeight;
|
20347
|
-
fabric.StaticCanvas.prototype.setHeight = function(height) {
|
20348
|
-
origSetHeight.call(this, height);
|
20349
|
-
this.nodeCanvas.height = height;
|
20350
|
-
return this;
|
20351
|
-
};
|
20352
|
-
if (fabric.Canvas) {
|
20353
|
-
fabric.Canvas.prototype.setHeight = fabric.StaticCanvas.prototype.setHeight;
|
20354
|
-
}
|
20355
|
-
|
20356
|
-
})();
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fabricjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arun Subramanian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,14 +38,15 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: ' Allows text,cufon,gestures,easing,parser,freedrawing,interaction,serialization,image_filters,gradient,pattern,shadow
|
42
|
-
|
41
|
+
description: ' Allows text,cufon,gestures,easing,parser,freedrawing,interaction,serialization,image_filters,gradient,pattern,shadow on
|
42
|
+
HTML5 canvas with FabricJs.'
|
43
43
|
email:
|
44
44
|
- gth824c@yahoo.com
|
45
45
|
executables: []
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
+
- .DS_Store
|
49
50
|
- .gitignore
|
50
51
|
- .idea/.name
|
51
52
|
- .idea/.rakeTasks
|
@@ -63,6 +64,9 @@ files:
|
|
63
64
|
- fabricjs-rails.gemspec
|
64
65
|
- lib/fabricjs/rails.rb
|
65
66
|
- lib/fabricjs/rails/version.rb
|
67
|
+
- vendor/.DS_Store
|
68
|
+
- vendor/assets/.DS_Store
|
69
|
+
- vendor/assets/javascripts/.DS_Store
|
66
70
|
- vendor/assets/javascripts/fabric.js
|
67
71
|
homepage: ''
|
68
72
|
licenses:
|
@@ -84,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
88
|
version: '0'
|
85
89
|
requirements: []
|
86
90
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.0.
|
91
|
+
rubygems_version: 2.0.2
|
88
92
|
signing_key:
|
89
93
|
specification_version: 4
|
90
94
|
summary: Contains FabricJS with all the features selected from the custom build.
|