-
Hi, I wonder if there is any documentation about the helperLineModule? I am currently migrating my Open-BPMN project form 2.1 to 2.3 @injectable()
export class BPMNElementSnapper implements ISnapper {
constructor(public grid: { x: number; y: number } = { x: 1, y: 1 }) { }
snap(position: Point, element: GModelElement): Point {
// default move 1x1...
return {
// maybe the better snap behavior instead of round()...
x: Math.floor(position.x),
y: Math.floor(position.y)
};
}
} But I recognized during migration to GLSP version 2.3, that binding this class in my ContainerModule
causes the following error:
Now I assume that the Snapper functionality is somehow replaced/included by the new |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @rsoika, the Weirdly enogugh your isse seems to be related to inversify which is complaing about async code, however I don't see any async code in your ISnapper implementation. Could you please verify that
constructor(@optional() @inject(TYPES.Grid) public readonly grid: Grid = { x: 1, y: 1 }) {}
|
Beta Was this translation helpful? Give feedback.
Hi @rsoika,
the
ISnapper
functionality has not been replaced and should work as before. TheHelperLineModule
and any other feature that relies on snapping (e.g. theChangeBoundsManager
) simply rely on the boundISnapper
implementation.Weirdly enogugh your isse seems to be related to inversify which is complaing about async code, however I don't see any async code in your ISnapper implementation.
Could you please verify that
ISnapper
binding@inject
annotation. Please align the constructor of your snapper with one of your example im…