Skip to content

Instantly share code, notes, and snippets.

View bug.re
open ApolloLinks;
open ApolloInMemoryCache;
type dataObject = {
.
"__typename": string,
"id": string,
"key": string
};
View application.scratch
<div style="width: 500px; height: 200px; overflow: scroll; border: 1px solid #CCC">
<div style="width: 800px;">
{{#table-grid
fixedGridTemplateColumns="11em 4em"
fixedGridTemplateRows="3em"
cellClassNames="bg-white"
columnClassNames=(array "first-column")
rowClassNames=(array "first-row" "second-row" "third-row")
customCellClass=evenOrOddClassNames
@bstro
bstro / application.scratch
Last active Feb 15, 2018
row/col provider
View application.scratch
<div style="width: 500px; height: 200px; overflow: scroll; border: 1px solid #CCC">
<div style="width: 800px;">
{{#table-grid
fixedGridTemplateColumns="11em 4em"
fixedGridTemplateRows="3em"
cellClassNames="bg-white"
columnClassNames=(array "first-column")
rowClassNames=(array "first-row" "second-row" "third-row")
customCellClass=evenOrOddClassNames
View application.scratch
<div style="width: 500px; height: 200px; overflow: scroll; border: 1px solid #CCC">
<div style="width: 800px;">
{{#table-grid
fixedGridTemplateColumns="11em 4em"
fixedGridTemplateRows="3em"
cellClassNames="bg-white"
columnClassNames=(array "first-column")
rowClassNames=(array "first-row" "second-row" "third-row")
customCellClass=evenOrOddClassNames
View components.table-grid-cell.js
import Ember from 'ember';
// no one will ever need more than 100000 cells.
const TOP_CELL_ZINDEX = 100000;
function _toSum(sumOfPreviousDimensions, cssValue) {
const separatedNumberAndUnitIdentifier = /(\d+)\s*(\w+)/
// '100px' => ['100px', '100', 'px'];
const [, curValue, curUnit] = cssValue.match(separatedNumberAndUnitIdentifier);
const [, prevValue, prevUnit] = sumOfPreviousDimensions.match(separatedNumberAndUnitIdentifier);
View components.table-grid-cell.js
import Ember from 'ember';
// no one will ever need more than 100000 cells.
const TOP_CELL_ZINDEX = 100000;
function _toSum(sumOfPreviousDimensions, cssValue) {
const separatedNumberAndUnitIdentifier = /(\d+)\s*(\w+)/
// '100px' => ['100px', '100', 'px'];
const [, curValue, curUnit] = cssValue.match(separatedNumberAndUnitIdentifier);
const [, prevValue, prevUnit] = sumOfPreviousDimensions.match(separatedNumberAndUnitIdentifier);
View components.table-grid-cell.js
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ["TableGridCell"]
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});