81 Commits

Author SHA1 Message Date
988cb29f50 fix: label text visible while editing
Related to https://github.com/camunda/camunda-modeler/issues/4477
2024-09-09 14:44:52 +02:00
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
556d003ebe chore: use UpdateLabelHandler for automatic label creation 2023-04-24 10:30:43 +02:00
acd5f5b5b4 chore: move BPMNLabel for activities to BpmnUpdater 2023-04-24 10:30:43 +02:00
3ea2852221 chore: simplify element type names 2023-04-19 12:18:42 +02:00
1d90ae636b fix: fix remaining JSDocs 2023-04-19 12:18:42 +02:00
07f75f7cd5 fix: fix remaining JSDoc and TS errors 2023-04-19 12:18:42 +02:00
168527323b chore: remove outdated type declarations 2023-04-19 12:18:42 +02:00
633c93d5fe feat(label-editing): type LabelUtil 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
c550d09d1d fix(label-editing): remove label property on empty label
closes #1637
2022-04-25 07:40:21 +00:00
05b7f775b0 fix(label-editing): submit change on drilldown navigation
closes #1609
2022-02-24 14:22:42 +00:00
34e3fa33fd fix(modeling): ensure di for embedded labels
closes #1540
2022-01-20 07:48:29 +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
769bcbeeff chore: adjust features to new DI structure
Related to https://github.com/bpmn-io/bpmn-js/issues/1472
2021-09-03 15:14:00 +02:00
7a67ff95b2 chore(documentation): fix JSDoc string types 2020-04-07 06:52:55 +00:00
960a085d4c fix(modeling): do not resize label target when setting empty label
This prevents a bug that cause the label target to be accidentally
resized if the user updates the label value to an empty string (or null).

Closes #1294
2020-03-30 07:53:16 +00:00
e4e789bd3e fix(label-editing): resize empty text annotations on complete
Related to bpmn-io/diagram-js-direct-editing#12
2020-03-10 14:35:39 +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
2fff30a284 feat(label-editing): support data input/output
Related to #951
2019-03-26 11:55:36 +01: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
a7a1743df0 fix(modeling): properly cascade label deletion
Ensure we execute the following nicely:

* unset name -> remove label shape
* remove label shape -> unset name
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
4bb270f192 chore(draw): unify text rendering into service
A newly introduced TextRenderer is responsible for text
rendering and text related bounds computation.

This removes a bunch of code duplication, too.
2018-05-24 16:26:01 +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
e4dbc422bf chore(project): migrate to tiny-svg@1.x 2018-03-28 10:49:55 +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