Commit graph

101 commits

Author SHA1 Message Date
Andrea Bogazzi
2a53b69e5b Update itext.class.js 2015-08-20 16:04:12 +02:00
Andrea Bogazzi
1bbc356393 Optimize use of cache, use standard method to retrieve char width 2015-08-18 12:38:36 +02:00
Andrea Bogazzi
ed3b701712 Removed some itext duplicated code 2015-08-17 17:21:08 +02:00
Juriy Zaytsev
fe087a0ceb Merge pull request #2389 from asturur/fix-double-measu
Removed unnecessary call to ctx.measureText
2015-08-06 10:37:11 -04:00
Andrea Bogazzi
36554dbcaa Update itext.class.js 2015-08-06 09:23:26 +02:00
Andrea Bogazzi
27b5d2b0fd Update textbox.class.js 2015-07-29 13:04:25 +02:00
Andrea Bogazzi
29f601512b Update text.class.js
Removed direct use of __lineWidths
2015-07-28 19:05:21 +02:00
inssein
079a6f4e30 fix styles when measuring 2015-06-11 10:55:18 -07:00
inssein
7b581b4753 CS 2015-06-11 10:25:43 -07:00
inssein
ce1023e709 whoops 2015-06-11 00:01:37 -07:00
inssein
9eb597c729 Use this.styles as if it's not affected by line-wraps. 2015-06-10 17:12:54 -07:00
inssein
489eb1bddf Textbox implementaion from Jaffer Haider, with one minor change in textbox_key_behavior 2015-05-27 15:30:40 -07:00
Andrea Bogazzi
cfd7521482 Update text.class.js 2015-05-18 08:16:04 +02:00
Andrea Bogazzi
902b44dbda a 2015-05-07 08:40:54 +02:00
Andrea Bogazzi
4bed22f4a9 iText clean up and style fixes 2015-04-29 08:27:56 +02:00
sapics
563ec42196 fix space and linebreak 2015-04-20 09:51:32 +09:00
Andrea Bogazzi
fb50a4f366 Fix cursor AND selection 2015-04-14 15:41:32 +02:00
Juriy Zaytsev
e932be0a15 Merge pull request #2081 from asturur/renderCursor
Render cursor - fix for viewportTransfrom
2015-04-05 18:00:50 +02:00
Andrea Bogazzi
37d5e63380 Update itext.class.js 2015-04-04 13:22:37 +02:00
Andrea Bogazzi
50e1d574e5 fixes cursor position with viewporttransform 2015-04-04 11:24:38 +02:00
Andrea Bogazzi
b6687f069a Update itext.class.js 2015-04-02 13:23:37 +02:00
Juriy Zaytsev
1257c52a87 Merge pull request #2065 from asturur/renderCursor
Render cursor on upper canvas
2015-03-31 13:38:57 +02:00
Andrea Bogazzi
f03c9d244b Modify cursor tick 2015-03-31 01:47:53 +02:00
Andrea Bogazzi
568e2ed2c0 attemp to fix jscs crash 2015-03-31 01:46:38 +02:00
Jeff Parsons
a0a4d77272 Track IText instances per-canvas, not globally.
Previously instances of the IText shape were added to a globally-shared
array when they were created. There are two problems with this approach:

1) Interactions with one canvas affect others. I would never expect
   text in one canvas to exit edit mode just because I interacted with
   some otherwise-unrelated canvas.

2) Every IText instance leaks. There is no mechanism to clean up references
   to IText instances in the global array, so every such instance will
   hang around in memory forever, regardless of whether it is removed from
   the canvas or if the canvas itself is removed.

Discovered while profiling memory usage in Chrome.
2015-03-24 14:14:43 +11:00
Andrea Bogazzi
84bd8bbda0 Update itext.class.js 2015-03-21 12:17:34 +01:00
Andrea Bogazzi
9ee71616bf Update itext.class.js 2015-03-07 15:57:04 +01:00
Andrea Bogazzi
b89bc01847 Fix misplacement of some iText 2015-03-01 19:05:50 +01:00
Andrea Bogazzi
0e09961c64 Update to text, rendering and optimization 2015-01-26 02:49:37 +01:00
Ulrich Sossou
dc7266bc1d Fix coding style 2014-08-24 18:25:58 +01:00
Ulrich Sossou
2541b7b69b Properly calculate width of whitespace characters when text is justified 2014-08-24 15:41:51 +01:00
Ulrich Sossou
a9933a5450 Use _getTopOffset to calculate top cursor boundary
Left cursor boundary is calculated with _getLeftOffset,
top cursor boundary should also be calculated with the corresponding offset method
2014-08-20 13:51:17 +01:00
kangax
818ab118b3 JSCS changes; Prepare for JSCS ignore support; down to 51 failures 2014-08-03 16:47:27 +02:00
Stefan Kienzle
b34387d10e JSDoc + JSCS tweaks - Part 1 2014-07-17 16:18:57 +02:00
Mike Shaver
825bec65df More doc-comment fixes. 2014-07-15 15:59:53 -07:00
Mike Shaver
095ee86e37 Fix some doc comment errors that were preventing build. 2014-07-15 15:34:06 -07:00
Chris Buergi
9a867f893f Fire 'selection:changed' on IText object.
Previously the 'text:selection:changed' was only fired on the canvas, but not on the object.
2014-07-03 10:02:47 +02:00
Chris Buergi
dda68b44dd Render IText correctly when only fontWeight or fontStyle changes
Fixes rendering of characters that only have the styles "fontWeight" and/or "fontStyle" set. Previously _hasStyleChanged() did not detect a change if only one of those two styles have been set.
2014-06-30 16:19:35 +02:00
kangax
d2f6a9033e Add JSCS validation & change bunch of things for conformance. Down to 333 failures from ~1000. 2014-02-16 16:36:14 -05:00
kangax
512b0186c8 Tweak iText after PR 2014-02-01 14:24:25 -05:00
Juriy Zaytsev
4a967b7ddf Merge pull request #1114 from GordoRank/Improve-IText-performance
Improve overall IText performance with varying styles > 1000%
2014-02-01 11:22:20 -08:00
kangax
68d4a74def Tweak few things in iText; build distribution 2014-02-01 13:18:22 -05:00
Juriy Zaytsev
93bd41f356 Merge pull request #1113 from GordoRank/Reduce-calls-to-fillText/strokeText-for-IText
Reduce calls to fillText/fillStroke in IText
2014-02-01 10:15:39 -08:00
Juriy Zaytsev
213b99eb9f Merge pull request #1127 from GordoRank/Optimize-searchPossibleTargets-for-IText
Optimize searchPossibleTargets for I-text
2014-01-27 12:54:02 -08:00
kangax
e977372236 Remove node 0.6 from travis until jsdom fixes it 2014-01-23 11:25:04 -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
f6108963b2 switch to 'text:selection:changed' 2014-01-23 01:31:20 +00:00
GordoRank
4631a8929a Update itext.class.js 2014-01-20 20:59:04 +00:00
GordoRank
ab67a7d1d6 Update itext.class.js 2014-01-20 15:28:50 +00:00
GordoRank
394732f3a3 Update renderCursor/renderSelection
Update renderCursor()/renderSelection() to draw to separate canvas
2014-01-20 14:54:41 +00:00