2012-05-03 20:21:13 +00:00
|
|
|
/**
|
|
|
|
* ContentEditable surface.
|
2012-05-03 23:02:21 +00:00
|
|
|
*
|
2012-05-03 20:21:13 +00:00
|
|
|
* @class
|
|
|
|
* @constructor
|
|
|
|
* @param model {ve.dm.Surface} Model to observe
|
|
|
|
*/
|
2012-05-03 21:02:35 +00:00
|
|
|
ve.ce.Surface = function( $container, model ) {
|
2012-05-03 23:02:21 +00:00
|
|
|
// Inheritance
|
|
|
|
ve.EventEmitter.call( this );
|
2012-05-04 00:19:01 +00:00
|
|
|
|
2012-05-03 20:21:13 +00:00
|
|
|
// Properties
|
2012-05-03 23:14:54 +00:00
|
|
|
this.model = model;
|
2012-05-04 22:20:14 +00:00
|
|
|
this.documentView = new ve.ce.Document( model.getDocument() );
|
2012-05-04 00:19:01 +00:00
|
|
|
this.$ = $container;
|
|
|
|
|
|
|
|
// Initialization
|
|
|
|
this.$.append( this.documentView.documentNode.$ );
|
2012-05-03 20:21:13 +00:00
|
|
|
};
|
2012-05-03 23:02:21 +00:00
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.extendClass( ve.ce.Surface, ve.EventEmitter );
|