Commit graph

1873 commits

Author SHA1 Message Date
kangax
f928e68386 Few small tweaks 2014-01-26 22:19:12 -05:00
Juriy Zaytsev
7c8389f560 Merge pull request #1129 from mizzack/patch-2
Adding nullcheck to touches attr on event.
2014-01-26 12:42:16 -08:00
mizzack
bed0cab833 Adding nullcheck to touches attr on event.
This was throwing errors in IE11 on desktop.  Not that it needs gesture support...
2014-01-26 15:36:31 -05:00
kangax
e977372236 Remove node 0.6 from travis until jsdom fixes it 2014-01-23 11:25:04 -05:00
kangax
f8eaa2ec4d Build distribution 2014-01-23 10:49:23 -05:00
kangax
3dd2f1572d Move for in body into a separate method (to allow inlining) 2014-01-23 10:49:23 -05:00
kangax
dbbfb992cb Add all properties onto prototype (not to invalidate hidden classes) 2014-01-23 10:49:23 -05:00
Juriy Zaytsev
b600c39119 Merge pull request #1112 from GordoRank/Add-textselected-event
Add "text:selection:changed" event
2014-01-22 21:48:36 -08:00
GordoRank
b75fa8c32d switch to 'text:selection:changed' 2014-01-23 01:32:08 +00:00
GordoRank
f6108963b2 switch to 'text:selection:changed' 2014-01-23 01:31:20 +00:00
Juriy Zaytsev
9f0f5e6bd2 Merge pull request #1111 from GordoRank/Only-add-hidden-textarea-when-in-editing-mode
Prevent multiple hidden Textareas
2014-01-22 16:44:36 -08:00
Juriy Zaytsev
c9a27eb6a0 Merge pull request #1110 from GordoRank/Fix-multiple-renderAll-when-exiting-editing-mode
Fix multiple renderAll when exiting editing mode
2014-01-22 16:36:25 -08:00
Juriy Zaytsev
de763bec78 Merge pull request #1109 from GordoRank/Fix-IText-Selection
Fix IText selection with varying font widths
2014-01-22 16:35:40 -08:00
GordoRank
e000ed0ef0 Remove clashing 'selected' event firing 2014-01-20 09:43:36 +00:00
GordoRank
cec2a17a47 Remove clashing 'selected' event firing 2014-01-20 09:43:00 +00:00
GordoRank
8cf567522d Update itext.class.js 2014-01-20 08:50:02 +00:00
GordoRank
764b55ed33 Fire text:selected on selectAll 2014-01-20 08:22:02 +00:00
GordoRank
3e1433acb1 Add text:selected event 2014-01-20 08:21:00 +00:00
GordoRank
9a2d697cf2 Prevent multiple hidden Textareas
Currently a hidden ```TEXTAREA``` is created for every IText instance and remain in the DOM forever.  

This patch creates the required textarea on demand in ```enterEditing``` and destroys it in ```exitEditing```

This prevents multiple Textareas from hanging around in the DOM which can cause slowdowns in complex scenes with lots of IText instances.
2014-01-20 08:14:31 +00:00
GordoRank
b814568294 Prevent multiple RenderAll calls on exit edit
This commit modifies the ```mouseUp ```handler to fix ```enterEditing``` behaviour, while maintaining the ability to fire ```enterEditing()``` programmatically
2014-01-20 07:46:59 +00:00
GordoRank
564266e3e2 Prevent multiple RenderAll calls on exit edit
This fix prevents ```renderAll()``` being called for each IText instance when ```exitingMode``` is exited.  Only one ```renderAll()``` is necessary
2014-01-20 07:42:33 +00:00
GordoRank
d088bb1fb7 Fix IText selection with varying font widths 2014-01-20 07:28:33 +00:00
kangax
aa98c317b7 Fix keyboard appearance on Android. Closes #1070 2014-01-18 16:08:41 -05:00
kangax
f1aef7ed1a Version 1.4.3 2014-01-18 12:01:19 -05:00
kangax
e6f4694bf8 Build distribution 2014-01-17 12:04:41 -05:00
kangax
bc8acac692 Only call _renderStroke in line and circle when this.stroke exists 2014-01-17 11:57:54 -05:00
kangax
20e0712688 Avoid set in fabric.Line#_setWidthHeight 2014-01-17 11:57:31 -05:00
kangax
727a8d04b1 Move _hasITextHandlers to canvas instance 2014-01-17 11:51:36 -05:00
kangax
13fcf15b8b Make sure compiler can inline 2014-01-17 11:51:16 -05:00
kangax
16447f9b7a Optimize _renderObjects to take fast path if no activeGroup given 2014-01-17 11:48:17 -05:00
Kienz
2fa70fc04e Quote node.js versions - otherwise 0.10 is truncated to 0.1 in travis-ci build matrix.
See issue https://github.com/travis-ci/travis-web/issues/160.
2014-01-14 21:37:38 +01:00
kangax
570a859b6d Version 1.4.2 2014-01-14 12:59:52 -05:00
kangax
eee3ca9768 Remove node 0.11 from travis for now 2014-01-14 12:57:14 -05:00
kangax
4761c2527c Build distribution 2014-01-14 12:57:13 -05:00
Juriy Zaytsev
7094ec47e2 Merge pull request #1094 from anvaka/fixNodeCanvas
createCanvasForNode passes options to FabricCanvas
2014-01-14 09:51:55 -08:00
Juriy Zaytsev
d4ea2c6f1e Merge pull request #1097 from GordoRank/master
Rewrite renderSelection to only draw once per line
2014-01-14 09:46:16 -08:00
GordoRank
0abc547d6b Fixed formatting and cache start.lineIndex 2014-01-14 17:37:40 +00:00
kangax
166dc60716 Fix JSHint warnings, build distribution 2014-01-14 12:34:32 -05:00
GordoRank
9f2c678a66 Formatting fixed and end.lineIndex cached 2014-01-14 17:23:40 +00:00
GordoRank
350261437a Rewrite renderSelection to only draw once per line
Previously RenderSelection performed a fillRect() command for every character.  This resulted in poor performance on large bodies of text.  This rewrite calculates the selection box for each line of text and draws a single rectangle for each line, dramatically improving performance.
2014-01-14 17:09:19 +00:00
Juriy Zaytsev
283b36c8ed Merge pull request #1090 from GordoRank/master
Various IText fixes
2014-01-14 09:08:00 -08:00
GordoRank
90a97e6272 Fix click cursor placement on center/right text
This clamps the click cursor placement so that clicking to the left of a short first line of centered/right aligned text positions the cursor to the left of the first character in the line....

Previously in that instance it would move to the left boundary instead
2014-01-14 15:48:59 +00:00
GordoRank
77f304bed0 Fixes Center/Right aligned cursor placement
Fixes Center/Right aligned cursor placement by mouse click when the text box is scaled
2014-01-14 13:58:06 +00:00
GordoRank
272859b8f1 Formatting fixes 2014-01-14 11:03:27 +00:00
GordoRank
1e9c58ea01 formatting fixes 2014-01-14 11:00:48 +00:00
GordoRank
a7e0e681d5 Formatting fixes 2014-01-14 10:56:43 +00:00
anvaka
6486606670 createCanvasForNode passes options to FabricCanvas
Some options like renderOnAddRemove plays crucial role in canvas
performance. This change allows clients to use custom options for
node.js
2014-01-14 01:12:29 -08:00
GordoRank
a2cf96a020 Dblclick at end of word selects previous word
Fixes selectWord so that double clicking at the end of a word (just after the last character in the left half of the space) selects the previous word.  Again this is MS Word behaviour.
2014-01-14 00:25:42 +00:00
GordoRank
1499baa7c3 Move enterEditing back into MouseUp
Oops... thats better! :)

This way we get all the responsiveness benefits of setting the cursor position on mousedown but can still actually move the objects!
2014-01-14 00:00:25 +00:00
GordoRank
ec144b773d Set cursor restart delay to 0
Setting cursor restart delay to 0 improves responsiveness when beginning drag selection, works inline with my previous two commits for selectLine/selectWord
2014-01-13 23:32:22 +00:00