Commit graph

1199 commits

Author SHA1 Message Date
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
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
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
GordoRank
8cb74e00e2 Restart cursor on selectWord/selectLine
Restarting cursor rendering using initDelayedCursor(true) in selectWord and selectLine improves user perceived responsiveness and provides an accurate reproduction of MS Word behaviour
2014-01-13 23:19:18 +00:00
GordoRank
2c5c83f9da Moved enterEditing into MouseDown
MS word appears to move the caret on MouseDown, not on MouseUp as I thought.
2014-01-13 23:09:12 +00:00
GordoRank
2539c68cc8 Do not rely on options object in enterEditing #2 2014-01-13 22:43:58 +00:00
GordoRank
ead81813bd Do not rely on options object for enterEditing #1 2014-01-13 22:42:29 +00:00
GordoRank
6acb697b7a Fix more formatting 2014-01-13 22:27:25 +00:00
GordoRank
b8c83ed242 Fix formatting 2014-01-13 22:22:40 +00:00
GordoRank
cc52bf7039 rename __lastEditing to __lastIsEditing 2014-01-13 22:19:44 +00:00
GordoRank
3510004d97 Set cursor to mouse position on editing enter 2014-01-13 12:13:19 +00:00
GordoRank
0957c9ca9f Set cursor position to mouse click on enter 2014-01-13 12:12:12 +00:00
GordoRank
55bc6a990b Make flashing cursor behave like MSWord 2014-01-13 12:04:46 +00:00
GordoRank
3582fd3ba9 Make flashing cursor behave like MSWord 2014-01-13 11:58:26 +00:00
GordoRank
f56be28052 Make flashing cursor behave like MSWord 2014-01-13 11:56:56 +00:00
GordoRank
f7e24da770 Click after line should set cursor to this line
Clicking past the end of line selects the last character of that line
2014-01-13 10:19:39 +00:00
GordoRank
b6fb6491bc Dbl click into editing mode sets cursor position
Double click directly into editing mode sets cursor position rather than selects whole word
2014-01-13 09:29:56 +00:00
Juriy Zaytsev
2b74c2abc5 Merge pull request #1087 from Kienz/patch-1
Fix fabric.Canvas initialization for width/height attributes. Closes #1086
2014-01-12 06:38:07 -08:00
Juriy Zaytsev
bb7f52cc84 Merge pull request #1088 from Kienz/patch-2
Fix path regExp for compressed path commands
2014-01-12 06:37:46 -08:00
Kienz
da0866429a Initialize fabric.IText canvas handlers only once. Closes #1076
Qunit additions
2014-01-12 15:32:50 +01:00
Kienz
61f65bc206 Fix path regExp for compressed path commands
Fix regExp for e^x numbers
Add unit test for e^x numbers
2014-01-12 13:50:03 +01:00
Kienz
50899a79ef Fix fabric.Canvas initialization for width/height attributes. Closes #1086. 2014-01-12 11:33:42 +01:00
kangax
c5f97d69af Remove console.log in itext 2014-01-04 15:02:51 -05:00
kangax
92b0d5e282 Optimize rendering of 1x1 rectangles 2014-01-04 15:02:51 -05:00
kangax
d7c2076b8a Do not call shadowColor = ... when there's no shadow 2014-01-04 15:02:51 -05:00
kangax
e0aed05c3d Build distribution 2013-12-31 09:29:14 -05:00
kangax
ea811cbb23 Fix fabric.Path#path being "cloned" by reference 2013-12-31 09:29:14 -05:00
Stefan Kienzle
6776e62d00 Fix overlayImage / overlayColor during selection mode. Closes #1068 2013-12-27 10:19:57 +01:00
kangax
7c541da8cc Fix double callback in loadFromJSON if objects.length == 0. Closes #1056 2013-12-21 15:17:08 +01:00
mizzack
d13a4dd273 Correcting invalid control name 2013-12-19 11:02:23 -05:00
Marco Miltenburg
b97f850bbb Added check to make sure xml is defined and exit if undefined. 2013-12-18 13:44:04 +01:00
kangax
d478482a19 Fix number parsing in paths. Closes #961 2013-12-18 11:29:44 +01:00
kangax
ec629c6b59 Update text events 2013-12-18 11:28:06 +01:00
kangax
032cc05bd1 Fix background offset in iText. Closes #1029 2013-12-14 14:55:47 +01:00