This file contains hidden or 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 { showSaveModal } from '../../controllers/saveModalController'; | |
| import store from '../../store'; | |
| ... | |
| MyComponent extends React.Component<P, S> { | |
| public context: { | |
| router: any | |
| }; | |
| static contextTypes = { | |
| router: React.PropTypes.object.isRequired |
This file contains hidden or 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({ | |
| }); |
This file contains hidden or 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({ | |
| heightToggled: false, | |
| click() { | |
| this.toggleProperty('heightToggled'); | |
| } | |
| }); |
This file contains hidden or 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({ | |
| heightToggled: false, | |
| click() { | |
| this.toggleProperty('heightToggled'); | |
| }, | |
| actions: { |
This file contains hidden or 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({ | |
| heightToggled: false, | |
| click() { | |
| this.toggleProperty('heightToggled'); | |
| }, | |
| actions: { |
This file contains hidden or 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({ | |
| click() { | |
| this.attrs.toggleHeight(); | |
| } | |
| }); |
This file contains hidden or 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 _ from 'lodash'; | |
| import { select } from 'd3-selection'; | |
| import { scaleOrdinal as ordinal, schemeCategory20c as scheme } from 'd3-scale'; | |
| import { hierarchy, pack } from 'd3-hierarchy'; | |
| import { color } from 'd3-color'; | |
| import HeapProfile from './HeapProfile'; | |
| export default class Animation { | |
| constructor(options) { | |
| _.extend(this, options); |
This file contains hidden or 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'; | |
| import _ from 'lodash'; | |
| import { schemeCategory20 as scheme, scaleOrdinal as scale } from 'd3-scale'; | |
| import { hierarchy, pack } from 'd3-hierarchy'; | |
| import PIXI from 'pixi'; | |
| import PixiCanvas from 'ember-cli-pixijs/components/pixi-canvas'; | |
| const {inject: {service}, computed: {alias}} = Ember; | |
| const MAX_NODES = 100000; | |
| let hexColor; |
This file contains hidden or 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
| //Generate our basic textures | |
| function generateTextures(width, height, renderer) { | |
| scheme.forEach(hex => { | |
| const color = hexColor(hex); | |
| const size = nearestPow2(width < height ? width / 2 : height / 2); | |
| textures[color] = createTexture(color, size, renderer); | |
| }); | |
| } | |
| function createTexture(hex, size, renderer) { |
This file contains hidden or 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
| batchRender() | |
| let i = this._start; | |
| let startTime = Date.now(); | |
| let timeDiff = 0; | |
| while (i < nodes.length && timeDiff < 10) { | |
| const node = nodes[i]; | |
| const circle = new NodeCircle({ node, texture: texture(node.t) }); | |
| this.stage.addChild(circle.retainedSize); | |