Jürg Lehni
be82af9b47
Implement Item#matches(name, compare), along with Item#matches(match).
2014-10-15 15:09:44 +02:00
Jürg Lehni
77f6e68846
Remove documentation for deprecated #attach() methods.
2014-10-15 13:01:59 +02:00
Jürg Lehni
0894e625b0
Fix documentation issues with Path#get*At()
...
Closes #537 .
2014-10-15 13:00:50 +02:00
Jürg Lehni
e5714584ff
Fix return type of #getCurvatureAt() methods.
...
Closes #535 properly this time.
2014-10-15 12:02:21 +02:00
Jürg Lehni
b71e2c69d6
Fix documentation of Curve#getCurvatureAt(), as well as Path#getCurvatureAt() & co.
...
Closes #535
2014-10-14 13:52:57 +02:00
Jürg Lehni
862867ecd2
Bump Acorn version.
2014-10-09 00:17:16 +02:00
Jürg Lehni
3b2a82047e
Clean up event related comments, to reflect recent renaming.
2014-10-08 18:33:17 +02:00
Jürg Lehni
68585276a0
Rename ui folder to event.
2014-10-08 18:32:55 +02:00
Jürg Lehni
f4a36b7cd4
Remove all Palette and Component related code, as it is separated into its own project.
...
https://github.com/lehni/palette.js
2014-10-08 17:43:03 +02:00
Jürg Lehni
f29f3c8b11
Some code clean-up.
2014-10-08 16:36:22 +02:00
Jürg Lehni
8983953ccc
Do not export internal Http module.
2014-10-08 15:58:11 +02:00
Jürg Lehni
3c8331a94e
No longer export DomElement and DomEvent.
...
These are undocumented and meant to be private. They may change a lot still.
2014-10-08 15:55:12 +02:00
Jürg Lehni
a457228846
Fix formatting issues.
2014-10-08 15:52:41 +02:00
Jürg Lehni
c7c49d4091
Time to go with the flow and use the on()/off()/emit() pattern for events.
2014-10-08 14:57:56 +02:00
Jürg Lehni
3dc5c94e25
Rename Callback mix-in to Emitter.
2014-10-08 14:13:08 +02:00
Jürg Lehni
d2c2b0a7fd
Implement ruler component, and only use palettejs-input id for actual inputs that can have labels.
2014-10-08 00:24:27 +02:00
Jürg Lehni
2217bc2c29
Only expose observed component value in values object if it was already defined there initially.
...
It seems like too much magic to expose values defined on components there too.
2014-10-08 00:23:52 +02:00
Jürg Lehni
d4c509b4d4
Allow finding of palettes by their ids.
2014-10-07 23:42:40 +02:00
Jürg Lehni
369fcfc7cf
Add disabled class to components that have enabled = false.
2014-10-07 23:42:03 +02:00
Jürg Lehni
a92b8eb591
Correctly name boolean getters.
2014-10-07 23:41:26 +02:00
Jürg Lehni
c405c78d41
Implement #element getters to get the native DOM element on Palette and Component.
2014-10-05 12:35:33 +02:00
Jürg Lehni
90d088e708
Switch to object literal constructor for Palette and support props.parent, to set a palette's parent in the DOM.
2014-10-05 12:33:40 +02:00
Jürg Lehni
689e150bb7
Use <span> for text components so they can have a suffix as well.
2014-10-05 12:18:18 +02:00
Jürg Lehni
ca730cd76e
Rename _input to _element since it can be other things than <input>, and simplify <button> handling.
2014-10-05 11:17:53 +02:00
Jürg Lehni
8344ea9639
Switch from <input type="button"> to <button> for button components, and allow #text as an alias to #value for better semantics.
2014-10-05 11:14:02 +02:00
Jürg Lehni
6e4c2ebc64
Use an injection loop to produce all methods that simply forward from Palette to root Component.
2014-10-05 00:23:16 +02:00
Jürg Lehni
5456f1a595
Clean up DOM code a bit.
2014-10-05 00:19:47 +02:00
Jürg Lehni
9fec267dd4
Implement table captions through Palette#title / Component#title.
2014-10-05 00:11:29 +02:00
Jürg Lehni
b9af3af6f4
Bring back change event to Palette.
2014-10-04 19:51:10 +02:00
Jürg Lehni
6b9a40d987
Improve documentation of components code.
2014-10-04 19:46:44 +02:00
Jürg Lehni
5f7fd42bcb
Add comment about layout components.
2014-10-04 19:39:17 +02:00
Jürg Lehni
ddc7675c13
Improve Component layout class name handling.
2014-10-04 19:35:26 +02:00
Jürg Lehni
22d79948a0
Rename horizontal
to columns
2014-10-04 19:02:56 +02:00
Jürg Lehni
73529f0170
Merge Pane functionality into Component.
...
Work in progress.
2014-10-04 18:58:11 +02:00
Jürg Lehni
e46a1d24da
Move View classes to their own folder.
...
That's not really UI.
2014-10-04 16:51:58 +02:00
Jürg Lehni
5b71dabba2
Rename 'pane' Component to 'column'.
2014-10-02 20:02:04 +02:00
Jürg Lehni
aa73083d4f
Make sure nested components are available through the components hierarchy.
2014-10-02 19:41:39 +02:00
Jürg Lehni
4ef4a293ea
Expose child components.
2014-10-02 19:20:03 +02:00
Jürg Lehni
fe019f926e
Fix Component#setSuffix()
2014-10-02 18:59:26 +02:00
Jürg Lehni
88bc14f597
Clean up Pane code a bit.
2014-10-02 18:45:51 +02:00
Jürg Lehni
8907662524
Use this._set() instead of Base.set(), since it filters for existing properties.
2014-10-02 18:35:03 +02:00
Jürg Lehni
fd6741ce5a
Implement Component type 'pane' and merge more functionality with 'row'.
2014-10-02 18:16:38 +02:00
Jürg Lehni
99d46b4478
Restructure Component constructor to facilitate upcoming 'pane' Component type.
2014-10-02 17:09:40 +02:00
Jürg Lehni
85fbc94f41
Move Palette related functionality form Pane to Palette constructor.
2014-10-02 17:09:08 +02:00
Jürg Lehni
e1fba03b34
Make Component#enabled work for row type.
2014-10-02 17:02:26 +02:00
Jürg Lehni
f4c4522c18
Remove references to this
in DomElement os we can call method references directly, and always check el for null.
2014-10-02 17:00:40 +02:00
Jürg Lehni
7194d4bcf0
Fix palette labels and improve CSS id / class structure.
2014-10-02 16:30:27 +02:00
Jürg Lehni
54de02149b
Implement 'row' type component, for multiple components per row in palettes.
2014-10-02 16:05:56 +02:00
Jürg Lehni
09a4defb73
Separate Palette into Pane and Palette to prepare for nested UIs.
2014-10-02 09:45:19 +02:00
Jürg Lehni
47c225a782
Fix typo.
...
As reported by https://github.com/paperjs/paperjs.org/pull/7
2014-10-02 01:03:39 +02:00
Jürg Lehni
139adc72de
Implement object literal constructor for Palette.
2014-09-30 08:20:44 +02:00
Jürg Lehni
d6481bcb5b
Implement Component#enabled and Palette#enabled
2014-09-30 08:20:18 +02:00
Jürg Lehni
021ba59c54
Implement Component#visible.
2014-09-30 08:16:26 +02:00
Jürg Lehni
c7970e367d
Always set Component#value at the end of all other values.
...
Closes #365 .
2014-09-29 17:15:33 +02:00
Jürg Lehni
24a80dca27
Remove debug logging.
2014-09-29 16:12:50 +02:00
Jürg Lehni
3cb84842ff
Remove forced colon in label, so we can add it optionally through CSS instead.
2014-09-29 15:46:29 +02:00
Jürg Lehni
214ac10d57
Add support for Component#suffix, to define a linked label that should appear after the input element.
2014-09-29 15:46:04 +02:00
Jürg Lehni
c2cb3e3342
Improve Palette and Component code.
...
- Only create label elements when they are set for the first time.
- Give created elements clear class and id names.
2014-09-29 15:41:14 +02:00
Jürg Lehni
e541b10e89
Move user-agent code to PaperScope and expose through PaperScope#browser.
2014-09-29 13:07:02 +02:00
Jürg Lehni
6a11532322
Clean up and simplify code a bit further.
2014-09-28 11:49:46 +02:00
Jürg Lehni
7462fe0b70
Fix Curve.getParameterAt() for negative values of offset, and implement unit test.
...
Closes #524 .
2014-09-28 11:44:38 +02:00
Jürg Lehni
df190b6a47
Rearrange Project code for better doc sequence.
2014-09-27 22:53:37 +02:00
Jürg Lehni
2c9e15b070
Clean up comments.
2014-09-27 22:53:00 +02:00
Jürg Lehni
c87ce4de4c
Implement Item#replaceWith(item)
...
Closes #454
2014-09-27 22:52:37 +02:00
Jürg Lehni
91539e6bc5
Commit changes forgotten in 6450430b68
2014-09-27 22:51:22 +02:00
Jürg Lehni
6450430b68
Implement new strategy regarding Project#activeLayer:
...
- By default, no layer is created for any project.
- Project#activeLayer is a getter for the hidden #_activeLayer property. When it is called and no layer exists, one is created on the fly.
- Creating any other items creates a layer if none exists (was already the case).
2014-09-27 22:31:49 +02:00
Jürg Lehni
2dce6c4efa
Some code clean-up in Segment#_changed()
2014-09-27 22:09:25 +02:00
Jürg Lehni
cc8b23894c
Some clean up related to hidden _uncached parameter.
2014-09-27 22:03:54 +02:00
Jürg Lehni
b8530935a7
Streamline CurveLocation#getTangent/Normal/Curvature getter definitions to align with definitions in Curve, Path and PathIterator.
2014-09-27 22:03:20 +02:00
Jürg Lehni
8b4f59962e
Allow better code compression by removing repeated variable access on this.
2014-09-27 22:00:46 +02:00
Jürg Lehni
dd99db8d2d
Allow 'false' as well as 'off' for hidpi attribute, since that's what's in use for other attributes as well.
2014-09-26 18:03:37 +02:00
Jürg Lehni
762113230a
Implement Item#parentToLocal() and #localToParent()
...
As outlined in #530
2014-09-25 17:53:08 +02:00
Jürg Lehni
3389687c42
Do not check typeof module.exports === 'object', since it will be the Base constructor function after straps.js is included.
...
Closes #461
2014-09-25 16:46:34 +02:00
Jürg Lehni
5046a6a64c
Fix naming of PathIterator#get*At functions.
2014-09-24 12:32:07 +02:00
Jürg Lehni
4adab91a18
Remove unused argument.
2014-09-23 17:51:29 +02:00
Jürg Lehni
48e9447c47
Avoid error when SVG path data does not contain any 'm' commands.
...
Fixes #529
2014-09-22 17:44:15 +02:00
Jürg Lehni
ee27fe820f
Check for valid parameter range in Curve#getLocationAt() and delegate to it in #getLocationOf()
2014-09-20 11:09:09 +02:00
Jürg Lehni
c94fb3038f
Use valid parameter range [0,1] in calls to Curve.solveCubic().
2014-09-20 11:08:20 +02:00
Jürg Lehni
c2465b60fa
Transform the correct amount of points in Curve.getValues() when a matrix is provided.
2014-09-20 11:06:25 +02:00
Jürg Lehni
e5995527e8
Support Point argument reading for Style#shadowOffset.
2014-09-19 18:43:00 +02:00
Jürg Lehni
52dd24097f
Define PathIterator#getPoint(), #getTangent(), #getNormal() and #getCurvature().
2014-09-11 16:06:00 +02:00
Jürg Lehni
67d30f0042
Actually use maxRecursion and tolerance arguments in PathIterator, and increase precision in #flatten() a bit.
2014-09-11 15:20:04 +02:00
Jürg Lehni
73765e6654
Produce Path#getPointAt(), #getTangentAt(), #getNormalAt() & #getCurvature() in a loop, just like for Curve.
2014-09-10 11:21:06 +02:00
Jürg Lehni
50c5c6736c
Rename PathFlattener to PathIterator and include the class in exports.
2014-09-10 02:20:00 +02:00
Jürg Lehni
1db4fb4064
Refactor PathFlattener code and add maxRecursion and tolerance arguments to constructor.
2014-09-09 18:32:41 +02:00
Jürg Lehni
7d69ef1864
Fix documentation of bean properties that are not read-only.
...
@bean can only be used when the property is read-only or both getters and setters are present in the scope.
2014-08-26 10:01:30 +02:00
Jürg Lehni
73751040b7
Bump version to v0.9.20
2014-08-25 14:48:05 +02:00
Jürg Lehni
99b06b061c
Correctly match variables to be exposed at the beginning of PaperScripts.
2014-08-25 14:21:13 +02:00
Jürg Lehni
8574c1ebf6
Return the created scope from PaperScript.load()
2014-08-25 13:21:58 +02:00
Jürg Lehni
a564480522
Forgotten in previous commit.
2014-08-25 12:53:13 +02:00
Jürg Lehni
797a393c9a
Remove various double white-spaces.
2014-08-25 12:49:14 +02:00
Jürg Lehni
bcc8761f8c
Improve PaperScript#load() documentation.
2014-08-25 12:42:44 +02:00
Jürg Lehni
72f16eb1c3
Handle data-paper-ignore like any other Paper attribute, allowing the ignore="true" short-form as well.
2014-08-25 12:34:08 +02:00
Jürg Lehni
93dfd2a15a
Remove debugger statement.
2014-08-25 12:24:30 +02:00
Jürg Lehni
c03e9961d2
Allow PaperScript.load(script) to only load specific scripts, and define / improve documentation.
2014-08-25 12:21:27 +02:00
Jürg Lehni
992366246d
Ignore hash when comparing PaperScript URLs.
2014-08-25 12:20:58 +02:00
Jürg Lehni
4b19f99183
Improve user agent matching code in PaperScript.
...
Fixes #511 .
2014-08-20 18:54:00 +02:00
Jürg Lehni
6b4f728a72
Bring back support for paper.setup('id') again, and document it properly.
...
Closes #510 .
2014-08-20 16:53:31 +02:00
Jürg Lehni
db1ccd1d1e
Restructure includes.
2014-08-20 16:44:36 +02:00
Jürg Lehni
6faf61e6ef
Fix incompatibility with jsdom 1.0.0-pre.1
...
Closes #513
2014-08-20 15:06:13 +02:00
Jürg Lehni
9da6325f49
Fix wrong __options comments.
2014-08-16 19:27:25 +02:00
Jürg Lehni
48cb05a181
Replace tabs with 4 white-spaces.
2014-08-16 19:24:54 +02:00
Jürg Lehni
687199e95d
Fix some whitespaces.
2014-08-16 19:18:36 +02:00
Jürg Lehni
a2b7f9fc11
Remove __options.stats and load Stats library automatically only when in dev mode on the browser.
2014-08-16 19:11:16 +02:00
Jürg Lehni
21c9f97450
Update version handling and comments in options.js
2014-08-16 18:49:35 +02:00
Jürg Lehni
bcd3fe2493
Bump version to v0.9.19
2014-08-16 18:31:53 +02:00
Jürg Lehni
5aa4a8300e
Move 'data-paper-scope' attribute handling out of PaperScope into browser related code in PaperScript.
...
Closes #508
2014-08-16 18:24:45 +02:00
Jürg Lehni
288b8553e7
Support PaperScript code with only one line and no breaks.
2014-08-16 18:22:43 +02:00
Jürg Lehni
15d79bbefb
Introduce isRoot argument in SVGExport code as well, to make sure that top-most node holds all the style information.
...
Relates to #509
2014-08-16 17:32:24 +02:00
Jürg Lehni
4e9fc558ac
Prevent double-application of styles when importing #document SVG nodes.
...
Closes #509 .
2014-08-16 17:31:42 +02:00
Jürg Lehni
53b00b40e1
Move isRoot parameter last in SVGImport code.
2014-08-16 17:27:14 +02:00
Jürg Lehni
ce4e6053ec
Try un-prefixed name before various prefixes, to prevent console warnings.
2014-08-15 18:00:32 +02:00
Jürg Lehni
3ac9a4f369
Use local parent short-cut variable.
2014-08-15 15:38:28 +02:00
Jürg Lehni
4d4a39c752
Implement Curve#getOffsetOf(point) / Path#getOffsetOf(point)
...
Closes #463 .
2014-07-31 19:01:37 +02:00
Jürg Lehni
da22161d28
Correctly clear Curve length cache when segments change.
...
Closes #497
2014-07-31 17:00:52 +02:00
Jürg Lehni
c90a7c9f38
Only use the unmerged setting for #strokeScaling, as otherwise it'll be used on layers and groups already.
...
Closes #500
2014-07-29 23:39:51 +02:00
Jürg Lehni
06366fb0ed
Support prefixed UpdateExpressions and fix a bug in suffixed UpdateExpression when assigning to plain variables.
...
Related #492
2014-07-26 12:40:00 +02:00
Jürg Lehni
54f0197eba
Correctly handle UpdateExpressions (a++, a--) that are directly following AssignmentExpressions.
...
Closes #492
2014-07-26 12:29:05 +02:00
Jürg Lehni
6e6df750f0
Use names less likely to be used in code for Operator Overloading handlers.
2014-07-26 12:28:00 +02:00
Jürg Lehni
12254f5fe8
Fix two documentation errors in Raster.
...
Closes #495
2014-07-26 12:07:36 +02:00
Jürg Lehni
d96368a941
No need to convert strings to elements in View.create anymore, since PaperScript handles this already.
2014-07-26 12:07:14 +02:00
Jürg Lehni
0198f4c45f
Reuse PaperScope objects when associating multiple scripts with the same canvas.
...
Closes #504 .
2014-07-26 12:03:34 +02:00
Jürg Lehni
e0ec2bf2c3
Throw more meaningful error when CanvasView cannot be created from inexistent element.
2014-07-26 11:41:21 +02:00
Jürg Lehni
56704b9206
Fix a bug in Item#_removeNamed() for items without parents.
...
Closes #490 .
2014-07-25 21:08:14 +02:00
Jürg Lehni
04a0c995bc
Keep Math.acos() argument between -1 and 1.
...
Closes #482 .
2014-07-25 21:01:58 +02:00
Jürg Lehni
4fab100e71
Improve CommonJS support a bit.
2014-07-25 20:10:20 +02:00
Jürg Lehni
652dbe1e86
Use loop to produce CurveLocation getters, and add CurveLocation#curvature.
2014-07-25 20:05:44 +02:00
Jürg Lehni
d3d9e4bada
Improve some injection blocks.
2014-07-25 20:05:26 +02:00
Jürg Lehni
3c14a5ad05
Merge pull request #462 from jbielick/master
...
add commonJS export in browser environment export
2014-07-25 20:04:08 +02:00
Jürg Lehni
dc375d4c76
Correctly match the use of the unary operator $_ in PaperScript.
...
Closes #502
2014-07-23 12:17:55 +02:00
Jürg Lehni
3093a8ec43
Introduce matrix.chain(mx) as a shortcut to Matrix.clone().concatenate(mx)
...
Simplifies quite a few lines of code.
2014-07-08 15:43:17 +02:00
Jürg Lehni
66360bf58a
Fix minor documentation bug.
2014-07-08 15:43:17 +02:00
hkrish
ccbf4579fd
Don't remove the only intersection.
...
The previous code wrongly compared an intersection with itself while checking for duplicates.
2014-06-21 10:31:07 +02:00
hkrish
6c6ad76c94
Handle overlapping intercepts in getIntersection,
...
In a more robust way. Restricting ranges in parameter is not a nice way
to handle endpoint intersections.
2014-05-17 13:43:46 +02:00
Jürg Lehni
5384a63238
Improve Item. _clearBoundsCache() fix.
2014-05-15 21:33:30 +02:00
Jürg Lehni
a7f57315a6
Fix Item._clearBoundsCache() recursion, correctly this time.
2014-05-15 21:30:06 +02:00
Jürg Lehni
a1c1fc8ed8
Fix an issue in _clearBoundsCache where circular recursion could happen in certain circumstances.
2014-05-15 21:24:09 +02:00
Jürg Lehni
f39b7603de
Remove pixelRatio handling from CanvasProvider and move it to Item#draw()
2014-05-15 17:14:37 +02:00
Jürg Lehni
af5e1609dd
Fix an issue where CompoundPath wouldn't draw correctly if children had styles that forced non-direct compositing.
2014-05-15 17:09:58 +02:00
Jürg Lehni
98f2e08775
Fix SVG export when view is zoomed.
2014-05-15 16:26:19 +02:00
Jürg Lehni
c0a911d3c7
Rename Raster#ppi to#resolution, and deprecate #ppi.
2014-05-15 15:36:24 +02:00
Jürg Lehni
9d7ec13724
Update prepro.js to version that can evaluate whole expressions, and fix a newly introduced issue with it.
2014-05-14 15:14:03 +02:00
Jürg Lehni
f38d3ee674
Handle view size and transformation correctly when exporting SVG.
...
Closes #277 .
2014-05-14 13:29:20 +02:00
hkrish
e5e2a8d7d4
Revert "Correct boolean condition in getWinding."
...
This reverts commit fcc2e93daf
.
2014-05-13 20:41:48 +02:00
hkrish
fcc2e93daf
Correct boolean condition in getWinding.
...
Also clarify the condition using braces
2014-05-13 20:14:53 +02:00
Jürg Lehni
aac98f2b25
Some code clean-up.
2014-05-13 13:54:31 +02:00
Jürg Lehni
a4f922cf26
Fix newly introduced error in SVG export.
2014-05-13 13:52:20 +02:00
Jürg Lehni
6896535663
Bring back accidentally removed ctx.beginPath();
2014-05-13 13:51:09 +02:00
Jürg Lehni
846c806034
Implement non-scaling strokes through Style#strokeScaling.
...
Closes #418 .
2014-05-13 13:38:51 +02:00
Jürg Lehni
68db4f9b59
Forgotten in previous commit.
2014-05-13 13:23:37 +02:00