1 // ========================================================================
  2 // SproutCore -- JavaScript Application Framework
  3 // ========================================================================
  4 
  5 /**
  6   This View is used by Greenhouse when application is in design mode
  7   It darkens the area around the `rootDesigner`
  8 */
  9 SC.RootDesignerHighLightView = SC.View.extend({
 10 
 11   /**
 12     The designer that owns this highlight
 13   */
 14   designer: null,
 15 
 16   classNames: 'high-light',
 17 
 18   render: function(context, firstTime) {
 19     var targetFrame = this.get('targetFrame');
 20     // render shadows
 21     context
 22     .begin('div').addClass(['top', 'cover']).addStyle({top: 0, height: targetFrame.y, left:0, right: 0}).end()
 23     .begin('div').addClass(['bottom', 'cover']).addStyle({top: targetFrame.y + targetFrame.height, bottom:0, left: 0, right:0}).end()
 24     .begin('div').addClass(['left', 'cover']).addStyle({left: 0, width: targetFrame.x, top: targetFrame.y, height: targetFrame.height}).end()
 25     .begin('div').addClass(['right', 'cover']).addStyle({left: targetFrame.x + targetFrame.width, right:0, top: targetFrame.y, height: targetFrame.height}).end();
 26 
 27   }
 28 
 29   // ..........................................................
 30   // EVENT HANDLING
 31   //
 32 
 33   // mouseDown: function(evt){
 34   //   return this._handle_click_event(evt);
 35   // },
 36   //
 37   // mouseUp: function(evt) {
 38   //   return this._handle_click_event(evt);
 39   // },
 40   //
 41   // mouseMoved: function(evt) {
 42   //   return this._handle_click_event(evt);
 43   // },
 44   //
 45   // mouseDragged: function(evt) {
 46   //   return this._handle_click_event(evt);
 47   // },
 48   //
 49   //
 50   // _handle_click_event: function(evt) {
 51   //   var d = this.designer,
 52   //       targetFrame = this.get('targetFrame');
 53   //   if(this.clickInside(targetFrame, evt) && d){
 54   //     return (d && d.mouseDown) ? d.mouseDown(evt) : null;
 55   //   }
 56   //   else if(d){
 57   //     d.resignRootDesigner();
 58   //     return YES;
 59   //   }
 60   //   else{
 61   //     return NO;
 62   //   }
 63   // }
 64 
 65 });
 66