Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150137 | Dec 22,2019 02:56 PM UTC | Dec 23,2019 09:40 AM UTC | Angular - EJ 2 | 3 |
![]() |
Tags: Diagram |
//disable zoom initially
public constraints: DiagramConstraints = DiagramConstraints.Default &~DiagramConstraints.Zoom;
ZoomIn(args) {
//enable zoom
this.diagramControl.constraints = DiagramConstraints.Default;
let zoomOptions: ZoomOptions = {
type: "ZoomIn",
//Sets the factor by which we can zoom in or zoom out
zoomFactor: 0.5
}
//zoomin the diagram
this.diagramControl.zoomTo(zoomOptions)
//disable zoom
this.diagramControl.constraints = DiagramConstraints.Default &~DiagramConstraints.Zoom;
}
ZoomOut() {
this.diagramControl.constraints = DiagramConstraints.Default;
let zoomOptions: ZoomOptions = {
type: "ZoomOut",
//Sets the factor by which we can zoom in or zoom out
zoomFactor: 0.5
}
//zoomout the diagram
this.diagramControl.zoomTo(zoomOptions)
this.diagramControl.constraints = DiagramConstraints.Default &~DiagramConstraints.Zoom;
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.