-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connect several update dependencies for axis tracks, for added blocks…
… and received features. request features of block initially without brush required. This is focused on displaying tracks when blocks are added to the axis, and features are received. axis-2d.js : dataBlocks() : depend on blockService.viewed.[] axis-tracks.js : merge(gpS) so that existing g.tracks are updated, and .exit().remove() for gpS and clipRectS. showTrackBlocks() : depend on axis1d.featureLength. axis-1d.js : featureLength() : depend on featuresForAxis. models/block.js : add featuresForAxis(). data/block.js : add dataAndReferences : add blockIds to blocksToView, for receivedBlocks(). paths-progressive.js : requestBlockFeaturesInterval() : there may not be a brush (handle axisBrush === null). frontend/app/ : ce195b1 10637 Sep 13 19:59 components/axis-2d.js 773885e 24888 Sep 17 10:52 components/axis-tracks.js c517d5d 22637 Sep 17 11:18 components/draw/axis-1d.js 5cadd92 1188 Sep 16 17:01 models/axis-brush.js 4b2106c 13417 Sep 16 17:01 models/block-adj.js 7564ed2 8048 Sep 16 17:01 models/block.js 50ef5be 15793 Sep 16 18:24 services/data/block.js 5e7159e 23626 Sep 17 10:31 services/data/paths-progressive.js
- Loading branch information
1 parent
2c5f1c9
commit a0b873c
Showing
8 changed files
with
93 additions
and
25 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ import { updateDomain } from '../../utils/stacksLayout'; | |
*/ | ||
const axisTickTransitionTime = 750; | ||
|
||
|
||
|
||
function blockKeyFn(block) { return block.axisName; } | ||
|
||
|
||
|
@@ -382,12 +384,16 @@ export default Ember.Component.extend(Ember.Evented, AxisEvents, AxisPosition, { | |
return domain; | ||
}), | ||
|
||
/** count of features of .dataBlocks */ | ||
featureLength : Ember.computed('[email protected]', function () { | ||
/** count of features of .dataBlocks | ||
* Also depend on block.featuresForAxis, to trigger a request for features of | ||
* a block when it is added to an axis. | ||
*/ | ||
featureLength : Ember.computed('dataBlocks.@each.{featuresLength,featuresForAxis}', function () { | ||
let dataBlocks = this.get('dataBlocks'), | ||
featureLengths = dataBlocks.map(function (b) { return b.get('featuresLength'); } ), | ||
featureLength = sum(featureLengths); | ||
console.log(this, dataBlocks, featureLengths, 'featureLength', featureLength); | ||
let featuresForAxis = dataBlocks.map(function (b) { return b.get('featuresForAxis'); } ); | ||
console.log(this, dataBlocks, featureLengths, 'featureLength', featureLength, featuresForAxis /*.length*/); | ||
let axisS = this.get('axisS'); if (axisS) axisS.log(); | ||
return featureLength; | ||
}), | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,10 @@ export default Service.extend(Ember.Evented, { | |
}); | ||
let blocksToView = this.blocksReferences(blockIds); | ||
this.viewReferences(blocksToView); | ||
this.receivedBlocks(blocksToView); | ||
let dataAndReferences = blocksToView.concat( | ||
blockIds.map((blockId) => { return {id : blockId, obj : this.peekBlock(blockId)}; })); | ||
console.log('taskGetSummary dataAndReferences', dataAndReferences); | ||
this.receivedBlocks(dataAndReferences); | ||
|
||
return blockFeatureCounts; | ||
}), | ||
|
@@ -373,7 +376,7 @@ export default Service.extend(Ember.Evented, { | |
*/ | ||
loadedViewedChildBlocks: Ember.computed( | ||
'viewed.[]', | ||
'blockValues.@each.{isViewed,isLoaded}', | ||
'blockValues.@each.{isViewed,isLoaded,hasFeatures}', | ||
function() { | ||
let records = | ||
this.get('viewed') | ||
|
@@ -393,6 +396,7 @@ export default Service.extend(Ember.Evented, { | |
/** @return Map of axes to loaded viewed child blocks */ | ||
axesBlocks : Ember.computed( | ||
'loadedViewedChildBlocks.[]', | ||
'[email protected]', | ||
function () { | ||
let records = this.get('loadedViewedChildBlocks'), | ||
map = records.reduce( | ||
|
@@ -408,7 +412,7 @@ export default Service.extend(Ember.Evented, { | |
new Map() | ||
); | ||
|
||
console.log('axesBlocks', map); | ||
console.log('axesBlocks', map, records); | ||
return map; | ||
}), | ||
/** Lookup the axis of block, and if none then use ensureAxis(). | ||
|
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