LEAF 4585 prevent negative coordinates for workflow steps #2600
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Applies a minimum value of 0 to the coordinates of workflow steps to resolve an issue where users could drag and save negative coordinates.
Server-side:
-saved x and y positions have a minimum value of 0.
Front end:
-add a local minimum x value used for CSS positioning to handle any existing saved negative x values so that they display on the screen (a min y value was already present).
-add jsPlumb draggable config option 'allowNegative' with a false value to prevent dragging steps offscreen (left or top)
Testing / Impact
Workflow Editor
-steps cannot be dragged to negative coordinates (outside of left or top of screen)
-steps that have negative coordinates saved still show on screen (portal workflow_steps can be edited in adminer)