Jürg Lehni
aa4d990c90
Move and unify handling of Item#_set(props) to new Item#_initialize(), and add support for props.insert = false.
2013-07-21 15:45:22 -07:00
Jürg Lehni
a4535edbb9
Bring back _class names, since code minification breaks reliance on constructor.name.
...
Closes #248 .
2013-06-23 20:18:32 -07:00
Jürg Lehni
10d5de3ed6
Implement a better way to name and export class constructors.
...
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
c533dda7b5
Finally found a better and faster alternative for this.base() calls, by setting base on the function object instead.
...
base can be accessed on named functions very easily, leading to another measurable speed increase. Finally all performance reasons against straps.js are eliminated!
2013-05-27 10:04:05 -07:00
Jürg Lehni
369b329b23
Change straps.js to directly use initialize() as constructor function rather than redirecting calls to it.
...
Should yield some interesting performance improvements.
2013-05-27 09:11:50 -07:00
Jürg Lehni
f34fe102a4
Use new alias notation for deprecated functions, wherever we can.
2013-05-06 21:01:04 -07:00
Jürg Lehni
b4a99415d0
Merge PathStyle, CharacterStyle and ParagraphStyle into Style.
...
Closes #130 .
2013-04-09 16:46:20 -07:00
Jürg Lehni
218732e320
Implement a row of simple optimizations to increase performance of Item constructors.
2013-04-07 17:36:09 -07:00
Jürg Lehni
0d98727328
Simplify drawing of seleced bounds by having Item#_boundsSelelected default to true for Raster, PlacedSymbol and TextItem.
...
One can now turn it off for these using item.bounds.selected = false;
2013-02-24 15:53:37 -08:00
Jürg Lehni
119e5acbf9
Move #_setProperties() and #set() from Item to Base, rename it to #_set and use it for Tool too.
2013-02-15 18:28:49 -08:00
Jürg Lehni
a043feae76
Implement serialization for TextItem.
2013-02-11 17:08:39 -08:00
Jürg Lehni
6c9c16ad3d
Update copyright information comments, and year.
2013-01-28 18:03:27 -08:00
Jürg Lehni
ae4e5d4be5
Rename Item#setProperties() to hidden #_setProperties() and add public Item#set() to use same functionality from outside.
2012-12-27 00:52:09 +01:00
Jürg Lehni
3ac039bd66
Implement properties object literal initialization for all Item constructors.
2012-12-25 22:12:25 +01:00
Jürg Lehni
ded73142a9
Simplify pointOrMatrix parameters and only allow points. Also remove internal _point cache from PointText and directly link #point to #matrix.
2012-12-25 17:57:04 +01:00
Jürg Lehni
15824e7aaf
Fix isEmpty for TextItems.
...
Closes #133 .
2012-12-18 05:29:03 +01:00
Jürg Lehni
0d2ed108e2
Refactor getBounds code so that functionality can be exposed as static methods on Path.
2012-12-15 08:19:10 -08:00
Jürg Lehni
35568c15f2
Implement transparent constant-substitution in prepro.js to shave of some extra bytes of final distribution file.
2012-11-05 18:11:44 -08:00
Jürg Lehni
e17e94b50b
Implement Item#isEmpty() for the various types.
...
And use it to tell #getBounds() when to ignore items.
2012-10-10 20:11:11 -07:00
Carlo Alberto Ferraris
9e79231198
Remove trailing comma
...
Closure compiler chokes on it.
2012-04-09 10:28:09 +03:00
Jürg Lehni
61dca0b4d0
Introduce standard way of passing matrices/points to Item constructors.
2011-12-20 23:33:53 +01:00
Jürg Lehni
4a46c8ac98
Fix recently introduced error with stroke/fillColor handling
...
Since CanvasContext#stroke/fillStyle cannot be set to null, we have to keep checking Style#fill/strokeColor even after calling #_setStyles().
2011-12-19 23:07:14 +01:00
Jürg Lehni
ea0eaf04ea
Make TextItem#style a reference to #characterStyle.
...
Internally, CharacterStyle extends PathStyle and is now stored in TextItem#_style.
2011-12-19 22:26:09 +01:00
Jürg Lehni
19429d9b6d
Automate generation of style accessors through Style class.
...
Shaving off some byes by adding more magic.
2011-12-19 22:14:10 +01:00
Jürg Lehni
92066a6ecb
Implement Item#_boundsType as a structure to control bounds handling and caching.
2011-11-24 16:03:05 +01:00
Jürg Lehni
310fbb260b
Remove _boundsCache and replace it with easier _simpleBounds flag.
2011-11-24 15:44:26 +01:00
Jürg Lehni
11f298c994
Start adding support for PointText#bounds and multi-line text, work in progress.
2011-11-23 18:12:41 +01:00
Jürg Lehni
79c0ad8cc5
Update copyright notices.
2011-07-01 12:17:45 +02:00
Jürg Lehni
bb467462c3
Merge pull request #10 from rdworth/text_content_string
...
TextItem content: Added coersion to string in content setter since 0 numb
2011-07-01 02:00:26 -07:00
Richard D. Worth
fdd62ed929
TextItem content: Added coersion to string in content setter since 0 number is falsy but '0' string is not. Removed coersion from PathStructure example (introduced in 5637b3e37e4541c4e78180a168107be8282c136f line 64)
2011-06-30 09:12:14 -04:00
Richard D. Worth
ac39873693
Whitespace. Removed all trailing whitespace from .js files
2011-06-30 06:01:51 -04:00
Jürg Lehni
7cd749e63d
Change all documentation to new convention of defining @class outside injection scope, fix some comments and a few errors with examples.
2011-06-22 23:56:05 +01:00
Jonathan Puckey
2361556af6
TextItem related documentation.
2011-06-21 00:54:14 +02:00
Jürg Lehni
af0e5a07b7
Add getter/setter for TextItem#content and use Change.CONTENT to notify of changes.
2011-06-19 23:28:41 +01:00
Jürg Lehni
ad04db85aa
Move over content handling from PointText to TextItem.
2011-06-19 23:23:52 +01:00
Jürg Lehni
3226147e00
Use a version of Bootstrap that always produces beans and remove all beans: true instructions.
2011-06-17 18:42:29 +01:00
Jürg Lehni
ffa79f4fd1
Clean up white spaces in comments.
2011-06-14 22:59:45 +01:00
Jonathan Puckey
a48a8d7a8d
Document TextItem#content.
2011-06-10 14:05:58 +02:00
Jonathan Puckey
8e84c79aa6
Documentation: capitalize 'string' and 'number' types.
2011-05-27 20:15:15 +02:00
Jonathan Puckey
24689300c3
Add TextItem documentation.
2011-05-23 18:56:13 +02:00
Jonathan Puckey
f676cc026f
Add TextItem#_clone to copy over characterStyle and paragraphStyle.
2011-05-20 21:33:25 +02:00
Jürg Lehni
c07f9b438e
Use same modification in static create() method of ParagraphStyle and CharacterStyle as was used in PathStyle.
2011-05-17 13:14:04 +01:00
Jürg Lehni
e5198fea40
Remove unused code that seems to stem from PointText.
2011-05-17 13:10:22 +01:00
Jonathan Puckey
979ab18e9a
Implement basic version of TextItem, PointText, CharacterStyle & ParagraphStyle.
2011-05-16 15:15:47 +02:00