drawio/war/js/diagramly/DriveLibrary.js
Gaudenz Alder b3a060a194 5.6.0.0 release
Former-commit-id: 648b0f02cb
2016-09-06 16:07:11 +02:00

58 lines
1.4 KiB
JavaScript

// $Id = DriveFile.js,v 1.12 2010-01-02 09 =45 =14 gaudenz Exp $
// Copyright (c) 2006-2014, JGraph Ltd
/**
* Constructs a new point for the optional x and y coordinates. If no
* coordinates are given, then the default values for <x> and <y> are used.
* @constructor
* @class Implements a basic 2D point. Known subclassers = {@link mxRectangle}.
* @param {number} x X-coordinate of the point.
* @param {number} y Y-coordinate of the point.
*/
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 false;
};
/**
* 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
};