DriveLibrary.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Copyright (c) 2006-2017, JGraph Ltd
  3. * Copyright (c) 2006-2017, Gaudenz Alder
  4. */
  5. DriveLibrary = function(ui, data, desc)
  6. {
  7. DriveFile.call(this, ui, data, desc);
  8. };
  9. //Extends mxEventSource
  10. mxUtils.extend(DriveLibrary, DriveFile);
  11. /**
  12. * Translates this point by the given vector.
  13. *
  14. * @param {number} dx X-coordinate of the translation.
  15. * @param {number} dy Y-coordinate of the translation.
  16. */
  17. DriveLibrary.prototype.isAutosave = function()
  18. {
  19. return true;
  20. };
  21. /**
  22. * Translates this point by the given vector.
  23. *
  24. * @param {number} dx X-coordinate of the translation.
  25. * @param {number} dy Y-coordinate of the translation.
  26. */
  27. DriveLibrary.prototype.save = function(revision, success, error)
  28. {
  29. this.ui.drive.saveFile(this, revision, mxUtils.bind(this, function(resp)
  30. {
  31. this.desc = resp;
  32. if (success != null)
  33. {
  34. success(resp);
  35. }
  36. }), error);
  37. };
  38. /**
  39. * Returns the location as a new object.
  40. * @type mx.Point
  41. */
  42. DriveLibrary.prototype.open = function()
  43. {
  44. // Do nothing - this should never be called
  45. };