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

GOJS diagram - change background color with undo-redo capability

$
0
0

@A.John wrote:

My application has a GOJS diagram. Its background color need to be changed with undo-redo capability. How this can be done in javascript/angularJS?
I have tried using the grid.areaBackground as below, then the color changes but undo-redo is not working.

code for diagram is as below:
var diagram = GO(go.Diagram, element[0],
{
"commandHandler.zoomFactor": 1.2,
allowMove:false,
allowLink:false,
allowDelete:false,
allowZoom:false,
allowCopy: false,
isEnabled: true,
"grid.visible": true,
"grid.gridCellSize": new go.Size(100, 100),
"grid.background":"red",
"toolManager.mouseWheelBehavior": go.ToolManager.WheelScroll
});

and my code for applying color change:
diagram.grid.areaBackground = $scope.selectedMemoColor;

Is there any way to bind the diagram background color and apply color change with undo-redo functionality?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles