-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of change bounds in several areas (#344)
* Improve handling of change bounds - Introduce change bounds manager to centralize bounds-related services -- Bounds changes through position snapping and movement restriction -- Validation for size and position of an element -- Customizable methods for when to use move and resize options - Introduce change bounds tracker for moves and resizes -- Tracker calculates move on diagram and calculates move and resizes -- Tracker supports options on which parts of the process are applied - Provide moveable wrappers for resize and routing handles Fixes eclipse-glsp/glsp#1337 - Extend current resize capabilities -- Introduce mode for symmetric resize -- Introduce one-dimensional resize on top, right, bottom and left side Fixes eclipse-glsp/glsp#1338 Fixes eclipse-glsp/glsp#1339 - Fix elements moving during resizing when hitting minimum bounds -- Store calculated minimum size from layouter in element -- Adapt resize so we do not produce invalid sized bounds Fixes eclipse-glsp/glsp#1340 Minor: - Ensure we get proper cursor feedback when hovering over resize handle - Add additional convenience functions - Add origin viewport command for convenience Contributed on behalf of Axon Ivy AG
- Loading branch information
1 parent
50b1e85
commit a0e5612
Showing
59 changed files
with
1,741 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2024 EclipseSource and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
rank: number; | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
********************************************************************************/ | ||
import { MousePositionTracker } from '@eclipse-glsp/sprotty'; | ||
import { injectable } from 'inversify'; | ||
import { Ranked } from './ranked'; | ||
|
||
@injectable() | ||
export class GLSPMousePositionTracker extends MousePositionTracker implements Ranked { | ||
/* we want to be executed before all default mouse listeners since we are just tracking the position and others may need it */ | ||
rank = Ranked.DEFAULT_RANK - 200; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.