By customizing the display of D3’s brush component, you can make a single-handle slider. Or, by using custom resize handles, you can make a two-handled slider.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Project: Currencyconverter.converterController | |
// Copyright: ©2009 My Company, Inc. | |
// ========================================================================== | |
/*globals Currencyconverter */ | |
/** @class | |
Converts one form of currency to another. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dynamically apply a mixin specified in an object property | |
var MyClass = SC.Object.extend({ | |
extraMixin: null, | |
foo: "bar", | |
init: function() { | |
this.mixin(this.extraMixin); | |
arguments.callee.base.apply(this, arguments); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contentView: SC.SourceListView.design({ | |
contentBinding: 'Authoring.reportTemplatesArrayController.content', | |
selectionBinding: 'Authoring.reportTemplatesArrayController.selection', | |
exampleView: SC.View.design({ | |
classNames: 'sc-list-item-view'.w(), | |
childViews: 'nameLabel'.w(), | |
/** | |
Add 'sel' class in render method. | |
*/ | |
render: function(context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Collection Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
componentName: "inner-component", | |
actions: { | |
handleComponentChange() { | |
this.set('componentName', "second-component"); | |
} | |
} | |
}); |