drawio/war/js/diagramly/DriveLibrary.js
Gaudenz Alder 5798efc85f 6.2.3 release
Former-commit-id: 3dc20ef7b4
2017-02-28 16:40:36 +01:00

52 lines
1 KiB
JavaScript

/**
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
*/
DriveLibrary = function(ui, data, desc)
{
DriveFile.call(this, ui, data);
this.desc = desc;
};
//Extends mxEventSource
mxUtils.extend(DriveLibrary, DriveFile);
/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
DriveLibrary.prototype.isAutosave = function()
{
return true;
};
/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
DriveLibrary.prototype.save = function(revision, success, error)
{
this.ui.drive.saveFile(this, revision, mxUtils.bind(this, function(resp)
{
this.desc = resp;
if (success != null)
{
success(resp);
}
}), error);
};
/**
* Returns the location as a new object.
* @type mx.Point
*/
DriveLibrary.prototype.open = function()
{
// Do nothing - this should never be called
};