Skip to content

Commit

Permalink
2.1.2 final
Browse files Browse the repository at this point in the history
  • Loading branch information
sporritt committed May 19, 2016
1 parent a98e707 commit b5b0466
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 55 deletions.
13 changes: 10 additions & 3 deletions dist/doc/changelog.html
Expand Up @@ -123,10 +123,17 @@
</ul>
</div>
<div class="markdown-body col-xs-9">
<h2>2.1.1</h2>
<h2>2.1.2</h2>

<ul>
<li>bugfix for groups: element exposed now via getEl method, not directly as el. </li>
<li>issue 523 - Endpoint click registration problems</li>
<li>issue 522 - Groups documentation</li>
</ul>

<h2>2.1.1</h2>

<ul>
<li>bugfix for groups: element exposed now via getEl method, not directly as el.</li>
</ul>

<h2>2.1.0</h2>
Expand All @@ -135,7 +142,7 @@ <h2>2.1.0</h2>
<li>&#39;elementDraggable&#39; event now fired whenever an element is made draggable via the <code>draggable</code> function</li>
<li>add support for &#39;groups&#39; - elements that can contain other elements, and which are collapsible.</li>
<li><p>upgrade to Mottle 0.7.2. a few fixes for event delegation.</p></li>
<li><p>upgrade to katavorio 0.15.0</p></li>
<li><p>upgrade to katavorio 0.17.0</p></li>
<li><p>upgrade to mottle 0.7.2</p></li>
<li><p>upgrade to jsBezier 0.8</p></li>
<li><p>upgrade to Biltong 0.3</p></li>

This comment has been minimized.

Copy link
@Rikk

Rikk May 26, 2016

2.0.7 is missing below...

This comment has been minimized.

Copy link
@sporritt

sporritt May 27, 2016

Author Collaborator

pardon?

This comment has been minimized.

Copy link
@sporritt

sporritt May 27, 2016

Author Collaborator

oh i see. a commit comment doesn't provide a whole lot of context.

This comment has been minimized.

Copy link
@Rikk

Rikk May 28, 2016

It is less intrusive than an Issue for non-important things.
Version 2.0.7 is not listed in changelogs.
/changelog.txt
/doc/wiki/changelog.md
/dist/doc/changelog.html

Expand Down
50 changes: 25 additions & 25 deletions dist/doc/groups.html
Expand Up @@ -128,7 +128,7 @@ <h2>Groups</h2>
<p>jsPlumb supports the concept of &#39;Groups&#39;, which are elements that act as the parent for a set of child elements. When a
Group element is dragged, its child elements (which are, in the DOM, child nodes of the Group element) are dragged
along with it. Groups may be collapsed, which causes all of their child elements to be hidden, and for any connections
from a child element to outside of the Group to be &quot;proxied&quot; onto the Group&#39;s collapsed container.</p>
from a child element to outside of the Group to be &quot;proxied&quot; onto the Group&#39;s collapsed element.</p>

<ul>
<li><a href="#adding">Adding a Group</a></li>
Expand All @@ -153,51 +153,51 @@ <h3>Adding a Group</h3>

<p>A simple example, using the defaults:</p>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">jsPlumb</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">({</span>
<span class="nx">container</span><span class="o">:</span><span class="nx">foo</span><span class="p">,</span>
<span class="nx">el</span><span class="o">:</span><span class="s2">&quot;foo&quot;</span><span class="p">,</span>
<span class="nx">id</span><span class="o">:</span><span class="s2">&quot;aGroup&quot;</span>
<span class="p">});</span>
</code></pre></div>
<p>Here we&#39;ve created a Group with ID <code>aGroup</code>. Its container element - <code>foo</code> - will be made draggable, and it will also
<p>Here we&#39;ve created a Group with ID <code>aGroup</code>. Its element - <code>foo</code> - will be made draggable, and it will also
be configured to accept elements being dropped onto it. By default, child elements will be draggable outside of the
Group container, but if they are not dropped onto another Group they will revert to their position inside the Group
container before they were dragged.</p>
Group element, but if they are not dropped onto another Group they will revert to their position inside the Group
element before they were dragged.</p>

<p>Several aspects of a Group&#39;s behaviour can be configured; broadly speaking these fall into two categories: the behaviour
of the Group container, and the behaviour of its child elements.</p>
of the Group element, and the behaviour of its child elements.</p>

<h4>Group container parameters</h4>
<h4>Group element parameters</h4>

<ul>
<li><strong>draggable</strong> Set to true by default. If false, the Group container will not be made into a draggable element.</li>
<li><strong>dragOptions</strong> Options for the Group container&#39;s drag behaviour. One parameter you will likely want to consider in
<li><strong>draggable</strong> Set to true by default. If false, the Group element will not be made into a draggable element.</li>
<li><strong>dragOptions</strong> Options for the Group element&#39;s drag behaviour. One parameter you will likely want to consider in
the <code>dragOptions</code> is <code>filter</code>, which provides a selector, or selectors, identifying elements that should not cause a
drag to begin. For a Group container you will probably want to identify the child elements of the Group, so that they
can be dragged without kicking off a drag of the Group container.</li>
<li><strong>droppable</strong> Set to true by default. If false, the Group container will not allow elements to be dropped onto it in
drag to begin. For a Group element you will probably want to identify the child elements of the Group, so that they
can be dragged without kicking off a drag of the Group element.</li>
<li><strong>droppable</strong> Set to true by default. If false, the Group element will not allow elements to be dropped onto it in
order to add them to the Group.</li>
<li><strong>dropOptions</strong> Options for the Group container&#39;s drop behaviour.</li>
<li><strong>dropOptions</strong> Options for the Group element&#39;s drop behaviour.</li>
<li><strong>proxied</strong> True by default. Indicates that connections to child elements inside the Group (which emanate from outside
of the Group) should be proxied, when the Group is collapsed, by connections attached to the Group&#39;s container.</li>
of the Group) should be proxied, when the Group is collapsed, by connections attached to the Group&#39;s element.</li>
</ul>

<h4>Child element behaviour parameters</h4>

<ul>
<li><p><strong>revert</strong> By default this is true, meaning that child elements dropped outside of the Group (and not onto another Group
that is accepting droppables) will revert to their last position inside the group on mouseup. If you set <code>revert:false</code>
you get a Group that allows child elements to exist outside of the bounds of the Group container, but which will still
you get a Group that allows child elements to exist outside of the bounds of the Group element, but which will still
drag when the Group is dragged and will be made invisible when the Group is collapsed.</p></li>
<li><p><strong>prune</strong> Set to false by default. If true, a child element dropped in whitespace outside of the Group container will
<li><p><strong>prune</strong> Set to false by default. If true, a child element dropped in whitespace outside of the Group element will
be removed from the Group and from the instance of jsPlumb, and any connections attached to the element will also be
cleaned up.</p></li>
<li><p><strong>orphan</strong> Set to false by default. If true, a child element dropped in whitespace outside of the Group container will
<li><p><strong>orphan</strong> Set to false by default. If true, a child element dropped in whitespace outside of the Group element will
be removed from the Group, but not from the instance of jsPlumb.</p></li>
<li><p><strong>constrain</strong> Set to false by default. If true, child elements are constrained to be dragged inside of the Group
container only.</p></li>
<li><p><strong>ghost</strong> Set to false by default. If true, a child element that is dragged outside of the Group container will have
element only.</p></li>
<li><p><strong>ghost</strong> Set to false by default. If true, a child element that is dragged outside of the Group element will have
its original element left in place, and a &#39;ghost&#39; element - a clone of the original - substituted, which tracks
with the mouse.</p></li>
<li><p><strong>dropOverride</strong> False by default. If true, child elements may be dragged outside of the Group container (assuming
<li><p><strong>dropOverride</strong> False by default. If true, child elements may be dragged outside of the Group element (assuming
no other flag prevents this), but may not be dropped onto other Groups.</p></li>
</ul>

Expand All @@ -220,15 +220,15 @@ <h3>Proxy Endpoints</h3>
appear. For instance, perhaps you want to show a smallish dot that tracks the perimeter of a Group when it is
collapsed:</p>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">jsPlumb</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">({</span>
<span class="nx">container</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">el</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">id</span><span class="o">:</span><span class="s2">&quot;aGroup&quot;</span><span class="p">,</span>
<span class="nx">anchor</span><span class="o">:</span><span class="s2">&quot;Continuous&quot;</span><span class="p">,</span>
<span class="nx">endpoint</span><span class="o">:</span><span class="p">[</span> <span class="s2">&quot;Dot&quot;</span><span class="p">,</span> <span class="p">{</span> <span class="nx">radius</span><span class="o">:</span><span class="mi">3</span> <span class="p">}</span> <span class="p">]</span>
<span class="p">});</span>
</code></pre></div>
<p>Perhaps you want to show a large rectangle in the top left corner:</p>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">jsPlumb</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">({</span>
<span class="nx">container</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">el</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">id</span><span class="o">:</span><span class="s2">&quot;aGroup&quot;</span><span class="p">,</span>
<span class="nx">anchor</span><span class="o">:</span><span class="s2">&quot;TopLeft&quot;</span><span class="p">,</span>
<span class="nx">endpoint</span><span class="o">:</span><span class="p">[</span> <span class="s2">&quot;Rectangle&quot;</span><span class="p">,</span> <span class="p">{</span> <span class="nx">width</span><span class="o">:</span><span class="mi">10</span><span class="p">,</span> <span class="nx">height</span><span class="o">:</span><span class="mi">10</span> <span class="p">}</span> <span class="p">]</span>
Expand Down Expand Up @@ -274,7 +274,7 @@ <h3>Dragging and dropping child elements</h3>
<li>Set <strong>droppable:false</strong> when you create a Group:</li>
</ul>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">jsPlumb</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">({</span>
<span class="nx">container</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">el</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">droppable</span><span class="o">:</span><span class="kc">false</span>
<span class="p">});</span>
</code></pre></div>
Expand All @@ -284,7 +284,7 @@ <h3>Dragging and dropping child elements</h3>
<li>Set <strong>constrain:true</strong> when you create a Group:</li>
</ul>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">jsPlumb</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">({</span>
<span class="nx">container</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">el</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">constrain</span><span class="o">:</span><span class="kc">true</span>
<span class="p">});</span>
</code></pre></div>
Expand All @@ -294,7 +294,7 @@ <h3>Dragging and dropping child elements</h3>
<li>Set <strong>dropOverride:true</strong> when you create a Group:</li>
</ul>
<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="nx">jsPlumb</span><span class="p">.</span><span class="nx">addGroup</span><span class="p">({</span>
<span class="nx">container</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">el</span><span class="o">:</span><span class="nx">someElement</span><span class="p">,</span>
<span class="nx">dropOverride</span><span class="o">:</span><span class="kc">true</span>
<span class="p">});</span>
</code></pre></div>
Expand Down
9 changes: 7 additions & 2 deletions doc/wiki/changelog.md
@@ -1,14 +1,19 @@
## 2.1.2

- issue 523 - Endpoint click registration problems
- issue 522 - Groups documentation

## 2.1.1

- bugfix for groups: element exposed now via getEl method, not directly as el.
- bugfix for groups: element exposed now via getEl method, not directly as el.

## 2.1.0

- 'elementDraggable' event now fired whenever an element is made draggable via the `draggable` function
- add support for 'groups' - elements that can contain other elements, and which are collapsible.
- upgrade to Mottle 0.7.2. a few fixes for event delegation.

- upgrade to katavorio 0.15.0
- upgrade to katavorio 0.17.0
- upgrade to mottle 0.7.2
- upgrade to jsBezier 0.8
- upgrade to Biltong 0.3
Expand Down
50 changes: 25 additions & 25 deletions doc/wiki/groups.md
Expand Up @@ -3,7 +3,7 @@
jsPlumb supports the concept of 'Groups', which are elements that act as the parent for a set of child elements. When a
Group element is dragged, its child elements (which are, in the DOM, child nodes of the Group element) are dragged
along with it. Groups may be collapsed, which causes all of their child elements to be hidden, and for any connections
from a child element to outside of the Group to be "proxied" onto the Group's collapsed container.
from a child element to outside of the Group to be "proxied" onto the Group's collapsed element.

- [Adding a Group](#adding)
- [Removing a Group](#removing)
Expand All @@ -28,54 +28,54 @@ A simple example, using the defaults:

```javascript
jsPlumb.addGroup({
container:foo,
el:"foo",
id:"aGroup"
});
```

Here we've created a Group with ID `aGroup`. Its container element - `foo` - will be made draggable, and it will also
Here we've created a Group with ID `aGroup`. Its element - `foo` - will be made draggable, and it will also
be configured to accept elements being dropped onto it. By default, child elements will be draggable outside of the
Group container, but if they are not dropped onto another Group they will revert to their position inside the Group
container before they were dragged.
Group element, but if they are not dropped onto another Group they will revert to their position inside the Group
element before they were dragged.

Several aspects of a Group's behaviour can be configured; broadly speaking these fall into two categories: the behaviour
of the Group container, and the behaviour of its child elements.
of the Group element, and the behaviour of its child elements.

#### Group container parameters
#### Group element parameters

- **draggable** Set to true by default. If false, the Group container will not be made into a draggable element.
- **dragOptions** Options for the Group container's drag behaviour. One parameter you will likely want to consider in
- **draggable** Set to true by default. If false, the Group element will not be made into a draggable element.
- **dragOptions** Options for the Group element's drag behaviour. One parameter you will likely want to consider in
the `dragOptions` is `filter`, which provides a selector, or selectors, identifying elements that should not cause a
drag to begin. For a Group container you will probably want to identify the child elements of the Group, so that they
can be dragged without kicking off a drag of the Group container.
- **droppable** Set to true by default. If false, the Group container will not allow elements to be dropped onto it in
drag to begin. For a Group element you will probably want to identify the child elements of the Group, so that they
can be dragged without kicking off a drag of the Group element.
- **droppable** Set to true by default. If false, the Group element will not allow elements to be dropped onto it in
order to add them to the Group.
- **dropOptions** Options for the Group container's drop behaviour.
- **dropOptions** Options for the Group element's drop behaviour.
- **proxied** True by default. Indicates that connections to child elements inside the Group (which emanate from outside
of the Group) should be proxied, when the Group is collapsed, by connections attached to the Group's container.
of the Group) should be proxied, when the Group is collapsed, by connections attached to the Group's element.

#### Child element behaviour parameters

- **revert** By default this is true, meaning that child elements dropped outside of the Group (and not onto another Group
that is accepting droppables) will revert to their last position inside the group on mouseup. If you set `revert:false`
you get a Group that allows child elements to exist outside of the bounds of the Group container, but which will still
you get a Group that allows child elements to exist outside of the bounds of the Group element, but which will still
drag when the Group is dragged and will be made invisible when the Group is collapsed.

- **prune** Set to false by default. If true, a child element dropped in whitespace outside of the Group container will
- **prune** Set to false by default. If true, a child element dropped in whitespace outside of the Group element will
be removed from the Group and from the instance of jsPlumb, and any connections attached to the element will also be
cleaned up.

- **orphan** Set to false by default. If true, a child element dropped in whitespace outside of the Group container will
- **orphan** Set to false by default. If true, a child element dropped in whitespace outside of the Group element will
be removed from the Group, but not from the instance of jsPlumb.

- **constrain** Set to false by default. If true, child elements are constrained to be dragged inside of the Group
container only.
element only.

- **ghost** Set to false by default. If true, a child element that is dragged outside of the Group container will have
- **ghost** Set to false by default. If true, a child element that is dragged outside of the Group element will have
its original element left in place, and a 'ghost' element - a clone of the original - substituted, which tracks
with the mouse.

- **dropOverride** False by default. If true, child elements may be dragged outside of the Group container (assuming
- **dropOverride** False by default. If true, child elements may be dragged outside of the Group element (assuming
no other flag prevents this), but may not be dropped onto other Groups.


Expand Down Expand Up @@ -107,7 +107,7 @@ You can control the location, appearance and behaviour of the Endpoints that app

```javascript
jsPlumb.addGroup({
container:someElement,
el:someElement,
id:"aGroup",
anchor:"Continuous",
endpoint:[ "Dot", { radius:3 } ]
Expand All @@ -118,7 +118,7 @@ Perhaps you want to show a large rectangle in the top left corner:

```javascript
jsPlumb.addGroup({
container:someElement,
el:someElement,
id:"aGroup",
anchor:"TopLeft",
endpoint:[ "Rectangle", { width:10, height:10 } ]
Expand Down Expand Up @@ -170,7 +170,7 @@ both already discussed above:

```javascript
jsPlumb.addGroup({
container:someElement,
el:someElement,
droppable:false
});
```
Expand All @@ -181,7 +181,7 @@ This prevents the Group from accepting dropped elements.

```javascript
jsPlumb.addGroup({
container:someElement,
el:someElement,
constrain:true
});
```
Expand All @@ -192,7 +192,7 @@ This will prevent elements from being dragged outside of the Group.

```javascript
jsPlumb.addGroup({
container:someElement,
el:someElement,
dropOverride:true
});
```
Expand Down

0 comments on commit b5b0466

Please sign in to comment.