Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Restrict the panning towards left side

$
0
0

@rahimhaji wrote:

Dear Friends,

iam creating a chart like below image:

https://forum.nwoods.com/uploads/db3963/original/2X/0/074ec7b6f09ade1280234d6d2488f4be455f8d38.jpeg 1

when scroll left or right sides, i freezed the left blue color nodes. its working fine.

i want to add panning towards right side, top & bottom only not left side. How can i restrict not to panning left side of the stage.

Please note that iam freezing left boxes while panning or scrolling right or left side. iam using below code for freezing:

“ViewportBoundsChanged”: recenterRoot,

function recenterRoot(e) {
 cXX = diagram.viewportBounds.x;
 //cY = diagram.viewportBounds.centerY;
 for (var inc4 = 1; inc4 <=mainCtrlInc ; inc4++) {
 var root = e.diagram.findNodeForKey(“C_”+inc4);
 if (root) {
 e.diagram.commit(function (diag) {
//console.log(root.location.x);
 root.location = new go.Point(cXX, root.location.y);
 root.layerName = “Foreground”;
 }, null); // don’t record in UndoManager
 }
 }
 }

Thanks & Regards,
Syed Abdul Rahim

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles