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.
View components.container-component.js
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
componentName: "inner-component", | |
actions: { | |
handleComponentChange() { | |
this.set('componentName', "second-component"); | |
} | |
} | |
}); |
View example.html
<!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> |
View my_page.js
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) { |
View gist:337732
// 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); | |
}, |
View Currencyconverter.converterController
// ========================================================================== | |
// Project: Currencyconverter.converterController | |
// Copyright: ©2009 My Company, Inc. | |
// ========================================================================== | |
/*globals Currencyconverter */ | |
/** @class | |
Converts one form of currency to another. |