Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120295559
query-viewer.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 09:06
Size
978 B
Mime Type
text/x-java
Expires
Sat, Jul 5, 09:06 (2 d)
Engine
blob
Format
Raw Data
Handle
27168644
Attached To
R2664 SHRINE MedCo Fork
query-viewer.js
View Options
import { inject } from 'aurelia-framework';
import { QueryViewerService } from 'views/query-viewer/query-viewer.service';
// -- config -- //
const nodesPerScreen = 10;
@inject(QueryViewerService)
export class QueryViewer {
constructor(service) {
this.screenIndex = 0;
this.showCircles = false;
this.service = service;
this.service
.fetchPreviousQueries()
.then(result => {
const queries = result.queryResults;
const nodes = result.adapters
return service.getScreens(nodes, queries);
})
.then(screens => {
this.screens = screens;
this.showCircles = this.screens.length > 1;
})
.catch(error => console.log(error));
}
// -- @todo: optimize with 'computedFrom' decorator or value converter-- //
get slidePct() {
return String(-100 * this.screenIndex) + '%';
}
}
Event Timeline
Log In to Comment