@antv/x6
Version:
JavaScript diagramming library that uses SVG and HTML for rendering
90 lines • 2.51 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graph_1 = require("../../graph");
graph_1.Graph.prototype.isHistoryEnabled = function () {
const history = this.getPlugin('history');
if (history) {
return history.isEnabled();
}
return false;
};
graph_1.Graph.prototype.enableHistory = function () {
const history = this.getPlugin('history');
if (history) {
history.enable();
}
return this;
};
graph_1.Graph.prototype.disableHistory = function () {
const history = this.getPlugin('history');
if (history) {
history.disable();
}
return this;
};
graph_1.Graph.prototype.toggleHistory = function (enabled) {
const history = this.getPlugin('history');
if (history) {
history.toggleEnabled(enabled);
}
return this;
};
graph_1.Graph.prototype.undo = function (options) {
const history = this.getPlugin('history');
if (history) {
history.undo(options);
}
return this;
};
graph_1.Graph.prototype.redo = function (options) {
const history = this.getPlugin('history');
if (history) {
history.redo(options);
}
return this;
};
graph_1.Graph.prototype.undoAndCancel = function (options) {
const history = this.getPlugin('history');
if (history) {
history.cancel(options);
}
return this;
};
graph_1.Graph.prototype.canUndo = function () {
const history = this.getPlugin('history');
if (history) {
return history.canUndo();
}
return false;
};
graph_1.Graph.prototype.canRedo = function () {
const history = this.getPlugin('history');
if (history) {
return history.canRedo();
}
return false;
};
graph_1.Graph.prototype.cleanHistory = function (options) {
const history = this.getPlugin('history');
if (history) {
history.clean(options);
}
return this;
};
graph_1.Graph.prototype.getHistoryStackSize = function () {
const history = this.getPlugin('history');
return history.getSize();
};
graph_1.Graph.prototype.getUndoStackSize = function () {
const history = this.getPlugin('history');
return history.getUndoSize();
};
graph_1.Graph.prototype.getRedoStackSize = function () {
const history = this.getPlugin('history');
return history.getRedoSize();
};
graph_1.Graph.prototype.getUndoRemainSize = function () {
const history = this.getPlugin('history');
return history.getUndoRemainSize();
};
//# sourceMappingURL=api.js.map