From 7b7ff5a5035ef7b87064910148851c3b7e282bbd Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Thu, 3 May 2012 13:21:13 -0700 Subject: [PATCH] Added ve.dm.Surface, ve.ce.Surface, ve.ce.Document Change-Id: I382730e1a9f1abcb4b42499267c8dcaf76fc64e1 --- modules/ve2/ce/ve.ce.Document.js | 12 ++++++++++++ modules/ve2/ce/ve.ce.Surface.js | 12 ++++++++++++ modules/ve2/dm/ve.dm.Surface.js | 11 +++++++++++ 3 files changed, 35 insertions(+) create mode 100644 modules/ve2/ce/ve.ce.Document.js create mode 100644 modules/ve2/ce/ve.ce.Surface.js create mode 100644 modules/ve2/dm/ve.dm.Surface.js diff --git a/modules/ve2/ce/ve.ce.Document.js b/modules/ve2/ce/ve.ce.Document.js new file mode 100644 index 0000000000..c3550054cf --- /dev/null +++ b/modules/ve2/ce/ve.ce.Document.js @@ -0,0 +1,12 @@ +/** + * ContentEditable document. + * + * @class + * @constructor + * @param model {ve.dm.Document} Model to observe + */ +ve.ce.Document = function( model ) { + // Properties + this.documentModel = model; + this.documentNode = new ve.ce.DocumentNode( model.getDocumentNode() ); +}; diff --git a/modules/ve2/ce/ve.ce.Surface.js b/modules/ve2/ce/ve.ce.Surface.js new file mode 100644 index 0000000000..3607deead6 --- /dev/null +++ b/modules/ve2/ce/ve.ce.Surface.js @@ -0,0 +1,12 @@ +/** + * ContentEditable surface. + * + * @class + * @constructor + * @param model {ve.dm.Surface} Model to observe + */ +ve.ce.Surface = function( model ) { + // Properties + this.surfaceModel = model; + this.documentView = new ve.ce.Document( model.getDocument() ); +}; diff --git a/modules/ve2/dm/ve.dm.Surface.js b/modules/ve2/dm/ve.dm.Surface.js new file mode 100644 index 0000000000..a8ac441c5b --- /dev/null +++ b/modules/ve2/dm/ve.dm.Surface.js @@ -0,0 +1,11 @@ +/** + * DataModel surface. + * + * @class + * @constructor + * @param {ve.dm.Document} doc Document model to create surface for + */ +ve.dm.Surface = function( doc ) { + // Properties + this.documentModel = doc; +};