56 Commits

Author SHA1 Message Date
384fad529c feat(label-editing): remove background for embedded labels
related to https://github.com/camunda/web-modeler/issues/8477
2024-04-24 10:25:28 +02:00
29baeb19dd feat: edit vertical pool/lane labels 2023-12-04 10:51:15 +00:00
e95e16746d chore: lift up label-editing/LabelUtil 2023-04-24 10:30:43 +02:00
3ea2852221 chore: simplify element type names 2023-04-19 12:18:42 +02:00
07f75f7cd5 fix: fix remaining JSDoc and TS errors 2023-04-19 12:18:42 +02:00
3c90e8ef96 feat(label-editing): activate direct editing on participant creation
Related to https://github.com/camunda/camunda-modeler/issues/3440
2023-02-13 16:32:00 +01:00
c42dbf8a70 style: update code style
Apply latest bpmn-io code style.
2022-08-18 10:57:23 +00:00
66c3612eb6 feat(copy-paste): implement group copy in a safe manner
* properly copy category and category value
* create category value when creating group label
2022-08-16 13:14:13 +00:00
59c7696ce0 fix: cancel direct editing before element deletion
This is take two on fixing #1664.

Without this fix selection change would trigger direct editing
completion before the delete listerer could cancel it.

Closes #1664
2022-06-08 12:24:27 +00:00
aa4b45da6c fix(label-editing): cancel on element deletion
Closes https://github.com/bpmn-io/bpmn-js/issues/1664
2022-05-25 07:54:42 +00:00
011f394d05 fix: complete direct editing on selection changed
Related to https://github.com/camunda/camunda-modeler/issues/2961
2022-05-17 14:34:03 +00:00
05b7f775b0 fix(label-editing): submit change on drilldown navigation
closes #1609
2022-02-24 14:22:42 +00:00
56eb34cc82 feat(modeling): do not trigger direct editing on newly created group
The first canonical operation is to resize the group
to the respective size, not to assign a group label.
2021-12-09 09:00:07 +01:00
dcf440b076 fix(auto-place): complete direct editing on auto place
Related to camunda/camunda-modeler#1502
2019-09-12 07:55:34 +02:00
715d2cca2e fix(label-editing): prevent direct editing after create
Closes #1164
2019-08-13 06:20:34 +00:00
d0ff81a6e7 feat(label-editing): auto-activate for group 2019-06-13 16:38:50 +00:00
93a4a579dd feat(label-editing): create categoryValue if not exist
Relates to #955
2019-05-28 06:46:53 +00:00
fb3398fa39 feat(label-editing): enable direct editing for group labels
* Adds external label for Groups
* Modifies referenced categoryValue

Closes #955
2019-05-28 06:46:53 +00:00
100f3fb2ee fix(label-behavior): text annotation resizing after text property change
Depends on bpmn-io/diagram-js#259

Related to camunda/camunda-modeler#631
2018-06-13 11:02:55 +02:00
6c081d854f chore(label-editing): remove businessObject name on empty text
The following two actions will now unset the
business objects name property:

* deleting external label
* entering empty text via direct editing
2018-06-11 11:39:08 +02:00
891cf4ac0c feat(draw+modeling): support lineHeight
* take numeric line height into account when
  rendering text labels
* take line height into account when directly
  editing labels
* use default line height of 1.2 for text rendering

Closes #803
2018-05-29 11:58:15 +02:00
7537757357 feat(labels): labels can be deleted
Related to camunda/camunda-modeler#243
2018-05-24 16:22:51 +02:00
16a7ab2879 fix(label-editing): complete on popup menu open
This improves the user flow.

Addresses camunda/camunda-modeler#770
2018-04-13 10:12:37 +02:00
9be61259bd chore(project): drop 'use strict'
We use ES modules, so 'use strict' is not necessary anymore.
2018-04-03 18:09:53 +02:00
d3449ca87c chore(project): es6ify source code
* use ES6 import / export
* UTILS: export individual utilities
* TESTS: localize TestHelper includes

BREAKING CHANGE:

* all utilities export independent functions
* library sources got ported to ES6. You must now use
  a ES module bundler such as Browserify + babelify or
  Webpack to consume this library (or parts of it).
2018-04-03 16:32:14 +02:00
245d1d6a96 chore(project): upgrade lodash to min-dash 2018-03-22 11:59:39 +01:00
19e4e19bb5 chore(project): migrate to new SECTION comments 2018-02-27 09:57:22 +01:00
b35aa48d14 fix(label-editing): complete on autoPlace start
Closes #764
2018-02-20 11:33:28 +01:00
f1daf4841f fix(modeling): support newBounds
This fixes a bug where Modeling#updateLabel would not work on
text annotations, because these need to have labels pre-configured.

* Modeling#updateLabel now takes the (optional) newBounds
* newBounds must now explicitly be passed to trigger resize
  for text annotations
* newBounds is _only_ passed for text annotations via
  LabelEditingProvider (it was discarded before anyway)
* lib/features/label-editing did not depend on lib/features/modeling
  for historical reasons. It now uses the offical #updateLabel
  API provided by Modeling
* Localize test diagrams

Closes #753
2018-01-29 17:20:41 +01:00
ae96f3714d feat(modeling): add auto placement from context menu
Elements will automatically be created at appropriate
positions when context menu create entries are being
clicked (rather than dragged).

This marks a major step forward for mobile modeling,
too as dragging, especially dragging out from very small
controls is very cumbersome to do.

Things we take into account:

* for bpmn:FlowNodes, we try to compute the current
  distance between elements on the flow based on
  connections going in and out of the flow nodes
  source element
* for bpmn:TextAnnotation we assume placement of the
  element top right of the source shape
* for bpmn:DataObject and friends we assume a
  placement bottom right of the source shape
* for all elements, we try not to place elements on
  top of each other; i.e. new elements will be pushed
  up or down accordingly, if an element at a chosen
  position does already exist

Integration into other services:

* context pad provider works with autoPlace, if
  available and defaults to drag start without
* auto placed elements are selected and direct editing
  may conditionally be activated based on element type
  (LabelEditingProvider knows the rules)

Users can out out of autoPlace by specifying the configuration
property `config.contextPad.autoPlace = false`.

Closes #563

BREAKING CHANGE:

* This breaks the default interaction from the context
  pad; if you rely on clicking to start the drag
  you can opt out of autoPlace:

  ```
  new BpmnJS({ contextPad: { autoPlace: false } });
  ```
2017-12-22 10:30:44 +01:00
4a3c0378b9 fix(label-editing): fix isTouch not being processed
Actually use event.isTouch to check label editing activation on
create.end.

This makes 7e928ec7092891a8d92e5bae2a7cbc95625aa55f work.
2017-12-13 13:30:51 +01:00
058cfbb579 chore(label-editing): use isAny helper 2017-12-13 13:30:51 +01:00
7e928ec709 fix(label-editing): use new isTouch detection for conditional activation
Chrome and other modern desktop browsers
ship with touch features out of the box.

Because of that, it is not possible to use
the check

```
'ontouchstart' in document.documentElement
```
2017-12-08 19:32:13 +01:00
e797d9c142 feat(label-editing): improve text annotation editing
Related to camunda/camunda-modeler#564
2017-07-25 15:05:35 +02:00
404c35c97f fix(BpmnRenderer): revert text annotations automatic content fitting
This reverts commit a53562e1d5ff37b91ad1e70d1069c15308802389.

Closes #635
2016-12-01 13:27:30 +01:00
a53562e1d5 feat(BpmnRenderer): text annotations automatically fit their content
Closes #600
2016-11-09 08:23:34 +01:00
5b9dc626a6 chore(label-editing): ensure minimum dimensions for internal labels
* This ensures a reasonable text box dimension at lower zoom levels

Closes #610
2016-09-05 15:52:23 +02:00
f7f868ec67 chore(label-editing): resize textbox during direct editing
Related to bpmn-io/diagram-js-direct-editing#2
2016-08-29 08:56:12 +02:00
6e8962574b revert(textarea): support automatic-resizing textarea
This reverts commit 11165e2c217f7c22cae6e6693f84f4e562973170.
2016-05-18 08:17:03 +02:00
11165e2c21 fix(textarea): support automatic-resizing textarea
Closes #472
2016-05-02 11:26:19 +02:00
9582a68faf fix(textarea-size-zoom): fixes the size of a label textbox on low zoom levels
Closes #477
2016-03-09 14:39:52 +01:00
7ad9c7106e fix(label-editing): complete editing operation on drag init
Make sure the direct editing results are applied (not discarded)
when the user starts a drag operation with direct editing active.

Closes #490
2016-03-08 14:41:32 +01:00
5d5683ff64 chore(project): update didi dependency 2015-10-20 15:34:16 +02:00
b233ab957c feat(snapping): add bpmn-specific move snapping
This commit adds message flow + collaboration specific snapping by
subclassing the diagram-js provided default Snapping implementation.

* Add collaboration snapping
* Rename lib/util/{Name}.js -> lib/util/{Name}Util.js

Closes #255
2015-04-29 15:04:54 +02:00
3996408404 chore(project): migrate to modularized lodash@3
* use specialized lodash utilities
* consistently apply 'use strict'

Related to #185
2015-02-02 14:46:21 +01:00
2909847ac8 feat(direct-editing): rework editing
This commit updates the default direct editing behavior.

It activates on non-touch environments only and only on embedded
labels, too.

This provides a way smoother modeling experience.
2014-12-23 16:56:35 +01:00
18784c5994 fix(label-editing): listen to correct events 2014-12-17 21:55:03 +01:00
66c7a31d34 chore(label-editing): deselect element during editing 2014-09-15 14:42:43 +02:00
a1044e2784 fix(label-editing): correctly compute direct-editing bbox
Closes #115
2014-09-09 15:21:21 +02:00
9d16e17c5c fix(labels): correct positioning + hide if empty
This commit improves the label handling by

* showing the label only if it exists
* updating the status accordingly
* positioning the label correctly on import

Related to #113
2014-09-08 19:03:39 +02:00