@@ -33,6 +33,7 @@ import {
3333} from '@eclipse-glsp/sprotty' ;
3434import { inject , injectable , optional } from 'inversify' ;
3535import { VNode } from 'snabbdom' ;
36+ import { EditorContextService } from '../../base/editor-context-service' ;
3637import { BoundsAwareModelElement , calcElementAndRoute , getDescendantIds , isRoutable } from '../../utils/gmodel-util' ;
3738import { LayoutAware } from './layout-data' ;
3839import { LocalComputedBoundsAction , LocalRequestBoundsAction } from './local-bounds' ;
@@ -49,6 +50,7 @@ export class BoundsDataExt extends BoundsData {
4950@injectable ( )
5051export class GLSPHiddenBoundsUpdater extends HiddenBoundsUpdater {
5152 @inject ( EdgeRouterRegistry ) @optional ( ) protected readonly edgeRouterRegistry ?: EdgeRouterRegistry ;
53+ @inject ( EditorContextService ) protected editorContext : EditorContextService ;
5254
5355 protected element2route : ElementAndRoutingPoints [ ] = [ ] ;
5456
@@ -114,7 +116,17 @@ export class GLSPHiddenBoundsUpdater extends HiddenBoundsUpdater {
114116 // prepare and dispatch action
115117 const responseId = ( cause as RequestBoundsAction ) . requestId ;
116118 const revision = this . root !== undefined ? this . root . revision : undefined ;
117- const computedBoundsAction = ComputedBoundsAction . create ( resizes , { revision, alignments, layoutData, routes, responseId } ) ;
119+ const canvasBounds = this . editorContext . canvasBounds ;
120+ const viewport = this . editorContext . viewportData ;
121+ const computedBoundsAction = ComputedBoundsAction . create ( resizes , {
122+ revision,
123+ alignments,
124+ layoutData,
125+ routes,
126+ responseId,
127+ canvasBounds,
128+ viewport
129+ } ) ;
118130 if ( LocalRequestBoundsAction . is ( cause ) ) {
119131 LocalComputedBoundsAction . mark ( computedBoundsAction ) ;
120132 }
0 commit comments