-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
355 additions
and
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6744,17 +6744,17 @@ [email protected]: | |
range-parser "~1.2.1" | ||
statuses "2.0.1" | ||
|
||
sequential-workflow-designer-angular@^0.24.8: | ||
version "0.24.8" | ||
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.24.8.tgz#9ec487a72e1ea9ce470c30629e43778558074909" | ||
integrity sha512-62fQrgVb7yOF+vA5RdSEoositp5AQ8iG8gV4KNSLPE3kf8rk8els8kiLDwtlH4H03UnAtamXTbNXMs6Xt7quGQ== | ||
sequential-workflow-designer-angular@^0.25.0: | ||
version "0.25.0" | ||
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.25.0.tgz#eb65370283a408c10eeb7b71b67dae2af9d6196b" | ||
integrity sha512-E100P2es8Gn5th0f0ErfjRr9TWWcgocz16kZocWvCHeOn5/iLo+oCuvSSZjewpnYTVA6oDcHH//KJnq5sPN69g== | ||
dependencies: | ||
tslib "^2.3.0" | ||
|
||
sequential-workflow-designer@^0.24.8: | ||
version "0.24.8" | ||
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.24.8.tgz#10deceece8133a8f7781e9ba36ad219b412a2e40" | ||
integrity sha512-DkLwdtkP2F8AnvrICtrgzTS4TfCpDHRTpN71G3OQSL1zky5T8I5GTm7iqnMmQkwfjRi1Xx8b8e5miW687/6jYw== | ||
sequential-workflow-designer@^0.25.0: | ||
version "0.25.0" | ||
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.25.0.tgz#db8d35441a68f0b05f169e458f12f5457f9beca9" | ||
integrity sha512-KNOTA4zx/TkpL0LHQFvNe2S07vejA4YjRcl6UNpLjG4fODQKfiZ8zj5RypcG54O6TArBU8eDEUwtXgnuopGEYQ== | ||
dependencies: | ||
sequential-workflow-model "^0.2.0" | ||
|
||
|
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
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
14 changes: 4 additions & 10 deletions
14
designer/src/workspace/viewport/classic-wheel-controller.ts
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 |
---|---|---|
@@ -1,20 +1,14 @@ | ||
import { WorkspaceApi } from '../../api/workspace-api'; | ||
import { ViewportApi } from '../../api/viewport-api'; | ||
import { WheelController } from '../../designer-extension'; | ||
import { QuantifiedScaleViewportCalculator } from './quantified-scale-viewport-calculator'; | ||
|
||
export class ClassicWheelController implements WheelController { | ||
public static create(api: WorkspaceApi) { | ||
public static create(api: ViewportApi) { | ||
return new ClassicWheelController(api); | ||
} | ||
|
||
private constructor(private readonly api: WorkspaceApi) {} | ||
private constructor(private readonly api: ViewportApi) {} | ||
|
||
public onWheel(e: WheelEvent) { | ||
const viewport = this.api.getViewport(); | ||
const canvasPosition = this.api.getCanvasPosition(); | ||
const newViewport = QuantifiedScaleViewportCalculator.zoomByWheel(viewport, e, canvasPosition); | ||
if (newViewport) { | ||
this.api.setViewport(newViewport); | ||
} | ||
this.api.handleWheelEvent(e); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
designer/src/workspace/viewport/default-viewport-controller-configuration.ts
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,5 @@ | ||
export interface DefaultViewportControllerConfiguration { | ||
scales: number[]; | ||
smoothDeltaYLimit: number; | ||
padding: number; | ||
} |
14 changes: 13 additions & 1 deletion
14
designer/src/workspace/viewport/default-viewport-controller-extension.ts
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 |
---|---|---|
@@ -1,6 +1,18 @@ | ||
import { WorkspaceApi } from '../../api'; | ||
import { ViewportControllerExtension } from '../../designer-extension'; | ||
import { DefaultViewportController } from './default-viewport-controller'; | ||
import { DefaultViewportControllerConfiguration } from './default-viewport-controller-configuration'; | ||
|
||
export type DefaultViewportControllerExtensionConfiguration = DefaultViewportControllerConfiguration; | ||
|
||
export class DefaultViewportControllerExtension implements ViewportControllerExtension { | ||
public readonly create = DefaultViewportController.create; | ||
public static create(configuration?: DefaultViewportControllerExtensionConfiguration): DefaultViewportControllerExtension { | ||
return new DefaultViewportControllerExtension(configuration); | ||
} | ||
|
||
private constructor(private readonly configuration: DefaultViewportControllerExtensionConfiguration | undefined) {} | ||
|
||
public create(api: WorkspaceApi): DefaultViewportController { | ||
return DefaultViewportController.create(api, this.configuration); | ||
} | ||
} |
Oops, something went wrong.