Sha256: 760c299d332386b9edaa2498c6137d6b270ed6bd63bf9b6f02356403e621dadd

Contents?: true

Size: 833 Bytes

Versions: 30

Compression:

Stored size: 833 Bytes

Contents

// ==========================================================================
// Project:   TestRunner.OffsetCheckboxView
// Copyright: ©2011 Apple Inc.
// ==========================================================================
/*globals TestRunner */

/** @class

  This special view class will automatically adjusts its left offset based 
  on an "offset" value, which is will be bound to the width of the split view.
  
  This way when you resize the split view, the checkbox view will move also.

  @extends SC.CheckboxView
*/
TestRunner.OffsetCheckboxView = SC.CheckboxView.extend(
/** @scope TestRunner.OffsetCheckboxView.prototype */ {

  /** bind to thickness of splitview (though a controller) */
  offset: 0,
  
  offsetDidChange: function() {
    this.adjust('left', this.get('offset')+6);
  }.observes('offset')

});

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
sproutcore-1.9.2 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.9.1 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.9.0 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.8.1 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.8.0 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/apps/tests/views/offset_checkbox.js