LocalLibrary.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // $Id = DriveFile.js,v 1.12 2010-01-02 09 =45 =14 gaudenz Exp $
  2. // Copyright (c) 2006-2014, JGraph Ltd
  3. /**
  4. * Constructs a new point for the optional x and y coordinates. If no
  5. * coordinates are given, then the default values for <x> and <y> are used.
  6. * @constructor
  7. * @class Implements a basic 2D point. Known subclassers = {@link mxRectangle}.
  8. * @param {number} x X-coordinate of the point.
  9. * @param {number} y Y-coordinate of the point.
  10. */
  11. LocalLibrary = function(ui, data, title)
  12. {
  13. LocalFile.call(this, ui, data, title);
  14. };
  15. //Extends mxEventSource
  16. mxUtils.extend(LocalLibrary, LocalFile);
  17. /**
  18. * Translates this point by the given vector.
  19. *
  20. * @param {number} dx X-coordinate of the translation.
  21. * @param {number} dy Y-coordinate of the translation.
  22. */
  23. LocalLibrary.prototype.getHash = function()
  24. {
  25. return 'F' + this.getTitle();
  26. };
  27. /**
  28. * Translates this point by the given vector.
  29. *
  30. * @param {number} dx X-coordinate of the translation.
  31. * @param {number} dy Y-coordinate of the translation.
  32. */
  33. LocalLibrary.prototype.isAutosave = function()
  34. {
  35. return false;
  36. };
  37. /**
  38. * Translates this point by the given vector.
  39. *
  40. * @param {number} dx X-coordinate of the translation.
  41. * @param {number} dy Y-coordinate of the translation.
  42. */
  43. LocalLibrary.prototype.saveAs = function(title, success, error)
  44. {
  45. this.saveFile(title, false, success, error);
  46. };
  47. /**
  48. * Translates this point by the given vector.
  49. *
  50. * @param {number} dx X-coordinate of the translation.
  51. * @param {number} dy Y-coordinate of the translation.
  52. */
  53. LocalLibrary.prototype.updateFileData = function()
  54. {
  55. // Do nothing
  56. };
  57. /**
  58. * Returns the location as a new object.
  59. * @type mx.Point
  60. */
  61. LocalLibrary.prototype.open = function()
  62. {
  63. // Do nothing - this should never be called
  64. };