-
-
Save cball/9712e368c938ff19b0b2 to your computer and use it in GitHub Desktop.
Financial Table
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.Controller.extend({ | |
appName:'Ember Twiddle', | |
scrollLeft: null, | |
scrollTop: null, | |
actions: { | |
scrollChange(scrollLeft, scrollTop) { | |
this.set('scrollLeft', scrollLeft); | |
this.set('scrollTop', scrollTop); | |
Ember.$('.column-headers').scrollLeft(scrollLeft); | |
} | |
} | |
}); |
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.Route.extend({ | |
model() { | |
var stuff = []; | |
for (var i = 0; i < 1000; i++) { | |
var content = [] | |
for (var j = 0; j <= 10; j++) { | |
content.push('(' + j + ',' + i + ')'); | |
} | |
stuff.push(content); | |
} | |
var rowHeaders = []; | |
for (var i = 0; i < 1000; i++) { | |
rowHeaders.push('Row ' + i); | |
} | |
var columnHeaders = []; | |
for (var i = 0; i <= 10; i++) { | |
columnHeaders.push('Column ' + i); | |
} | |
return { | |
content: stuff, | |
rowHeaders: rowHeaders, | |
columnHeaders: columnHeaders | |
} | |
} | |
}); |
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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.table-container { | |
position: relative; | |
height: 200px; | |
width: 400px; | |
} | |
.header-container { | |
position: relative; | |
width: 400px; | |
overflow-x: scroll; | |
} | |
.table-cell { | |
width: 120px; | |
display: inline-block; | |
} | |
.scrolling-content { | |
left: 150px; | |
} |
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
{ | |
"version": "0.5.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.2.0", | |
"ember-data": "2.2.0", | |
"ember-template-compiler": "2.2.0", | |
"ember-collection": "https://rawgit.com/rwjblue/e4b74b094b5955ba9b35/raw/cce3b30ff156d778e61061c95b7834ace7592a8c/ember-collection-demo.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment