Skip to content

Commit 0bbb464

Browse files
committed
Increase version to 0.21, supporting tools in direct JavaScript mode, including support for multiple tools.
1 parent fe97b94 commit 0bbb464

16 files changed

Lines changed: 392 additions & 223 deletions

build/preprocess.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# stripped Formated but without comments
3232
# compressed Uses UglifyJS to reduce file size
3333

34-
VERSION=0.2
34+
VERSION=0.21
3535
DATE=$(git log -1 --pretty=format:%ad)
3636

3737
COMMAND="./prepro.js -d '{ \"version\": $VERSION, \"date\": \"$DATE\" }' -d '$4' $2"

dist/docs/classes/CompoundPath.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,18 +2584,19 @@ <h3>Fill Style</h3>
25842584
<p><b>options.type:</b> Only hit test again a certain item
25852585
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
25862586
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
2587-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
2588-
taking into account stroke width.</p>
2589-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
2590-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
2587+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
2588+
items, taking into account stroke width.</p>
2589+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
2590+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
25912591
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
25922592
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
2593-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
2594-
segment points of open path items.</p>
2595-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
2596-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
2597-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
2598-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
2593+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
2594+
last segment points of open path items.</p>
2595+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
2596+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
2597+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
2598+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
2599+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
25992600
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
26002601
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
26012602
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

dist/docs/classes/Group.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,18 +1789,19 @@ <h3>Fill Style</h3>
17891789
<p><b>options.type:</b> Only hit test again a certain item
17901790
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
17911791
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
1792-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
1793-
taking into account stroke width.</p>
1794-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
1795-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
1792+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
1793+
items, taking into account stroke width.</p>
1794+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
1795+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
17961796
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
17971797
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
1798-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
1799-
segment points of open path items.</p>
1800-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
1801-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1802-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
1803-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1798+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
1799+
last segment points of open path items.</p>
1800+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
1801+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1802+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
1803+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
1804+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
18041805
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
18051806
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
18061807
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

dist/docs/classes/Item.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,18 +1654,19 @@ <h3>Fill Style</h3>
16541654
<p><b>options.type:</b> Only hit test again a certain item
16551655
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
16561656
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
1657-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
1658-
taking into account stroke width.</p>
1659-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
1660-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
1657+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
1658+
items, taking into account stroke width.</p>
1659+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
1660+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
16611661
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
16621662
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
1663-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
1664-
segment points of open path items.</p>
1665-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
1666-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1667-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
1668-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1663+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
1664+
last segment points of open path items.</p>
1665+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
1666+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1667+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
1668+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
1669+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
16691670
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
16701671
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
16711672
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

dist/docs/classes/Layer.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,18 +1748,19 @@ <h3>Fill Style</h3>
17481748
<p><b>options.type:</b> Only hit test again a certain item
17491749
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
17501750
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
1751-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
1752-
taking into account stroke width.</p>
1753-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
1754-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
1751+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
1752+
items, taking into account stroke width.</p>
1753+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
1754+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
17551755
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
17561756
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
1757-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
1758-
segment points of open path items.</p>
1759-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
1760-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1761-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
1762-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1757+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
1758+
last segment points of open path items.</p>
1759+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
1760+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1761+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
1762+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
1763+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
17631764
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
17641765
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
17651766
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

dist/docs/classes/Path.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4900,18 +4900,19 @@ <h3>Fill Style</h3>
49004900
<p><b>options.type:</b> Only hit test again a certain item
49014901
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
49024902
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
4903-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
4904-
taking into account stroke width.</p>
4905-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
4906-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
4903+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
4904+
items, taking into account stroke width.</p>
4905+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
4906+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
49074907
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
49084908
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
4909-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
4910-
segment points of open path items.</p>
4911-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
4912-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
4913-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
4914-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
4909+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
4910+
last segment points of open path items.</p>
4911+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
4912+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
4913+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
4914+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
4915+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
49154916
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
49164917
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
49174918
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

dist/docs/classes/PathItem.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,18 +2481,19 @@ <h3>Fill Style</h3>
24812481
<p><b>options.type:</b> Only hit test again a certain item
24822482
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
24832483
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
2484-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
2485-
taking into account stroke width.</p>
2486-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
2487-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
2484+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
2485+
items, taking into account stroke width.</p>
2486+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
2487+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
24882488
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
24892489
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
2490-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
2491-
segment points of open path items.</p>
2492-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
2493-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
2494-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
2495-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
2490+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
2491+
last segment points of open path items.</p>
2492+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
2493+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
2494+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
2495+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
2496+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
24962497
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
24972498
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
24982499
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

dist/docs/classes/PlacedItem.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,18 +1695,19 @@ <h3>Fill Style</h3>
16951695
<p><b>options.type:</b> Only hit test again a certain item
16961696
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
16971697
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
1698-
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
1699-
taking into account stroke width.</p>
1700-
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
1701-
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
1698+
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path
1699+
items, taking into account stroke width.</p>
1700+
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for
1701+
<a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
17021702
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
17031703
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
1704-
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
1705-
segment points of open path items.</p>
1706-
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
1707-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1708-
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
1709-
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1704+
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or
1705+
last segment points of open path items.</p>
1706+
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and
1707+
side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
1708+
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the
1709+
<a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items
1710+
(<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
17101711
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
17111712
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
17121713
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>

0 commit comments

Comments
 (0)