I need to update the values of the cell attributes of rappidjs using jquery. How can we do that?
Asked
Active
Viewed 235 times
1 Answers
0
Somewhere need to do work like it
makeIconInElements(app.graph.toJSON());
function makeIconInElements(json2) {
if (json2 != undefined) {
let changedJson = json2;
changedJson.cells.forEach(function (cell) {
if (cell.type == ){ }
});
app.graph.fromJSON(changedJson);
//resizeCell(app.paper.model);
//Resizing the cell if icons are outside the box.
changedJson.cells.forEach(function (cell) {
let getAllCells = app.graph.getCells();
if (cell.showIcons) {
let currentResizingStep = getAllCells.filter(function (el) { return el.attributes.id == cell.id; });
autoResize(app, currentResizingStep[0]);
}
});
if (lastModifiedStep.attrs.task.status != abs") {
currentRunningPosition = lastModifiedStep.position;
app.paperScroller.scroll(currentRunningPosition.x, currentRunningPosition.y);
}
}
}

Roberto Caboni
- 7,252
- 10
- 25
- 39

user3664950
- 1
- 3
-
1From Review: Code-only answers are discouraged on Stack Overflow because they don't explain how it solves the problem. Please edit your answer to explain what this code does and how it answers the question, so that it is useful to the OP as well as other users also with similar issues. See: [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer). Thanks – sɐunıɔןɐqɐp Aug 06 '20 at 08:10
-
you should use var getcell= app.graph.getCells(pass any id of cell); after this getcell.attributes.set('attrs/height',150); or getcell.attributes.attrs.width=150; – user3664950 Aug 24 '20 at 05:47