newAndOldNodes .classed("selected", function (n) { if (state.selection.isSelected(n)) return true; return false; }) .attr("transform", function (d) { return "translate(" + d.x + "," + d.y + ")"; }) .select('rect') .attr('height', function (d) { return d.getNodeHeight(view.state.showTypes); });
restoreExpandedState(): void { this.resizer.resizerLeft.classed("snapped", window.sessionStorage.getItem("expandedState-source") == "false"); this.resizer.resizerRight.classed("snapped", window.sessionStorage.getItem("expandedState-disassembly") == "false"); this.resizer.resizerRanges.classed("snapped", window.sessionStorage.getItem("expandedState-ranges") == "false"); this.setSourceExpanded(this.getLastExpandedState("source", true)); this.setDisassemblyExpanded(this.getLastExpandedState("disassembly", true)); this.setRangesExpanded(this.getLastExpandedState("ranges", true)); }
d3.timeout(() => { d3.select('.bars').selectAll('.bar') .filter(d => years.indexOf(Number(d.year)) > -1) .classed('selected', true); }, this.transitionSpeed);
svg.append("g") .attr("class", "y axis") .attr("transform", `translate(${width},0)`) .call(yAxis) .selectAll("g") .filter((value)=> !value) .classed("zero", true)
function stylePies(d) { var trace = d[0].trace, pts = d3.select(this).select('g.legendpoints') .selectAll('path.legendpie') .data(Plots.traceIs(trace, 'pie') && trace.visible ? [d] : []); pts.enter().append('path').classed('legendpie', true) .attr('d', 'M6,6H-6V-6H6Z') .attr('transform', 'translate(20,0)'); pts.exit().remove(); if(pts.size()) pts.call(stylePie, d[0], trace); }
d3.selectAll('.bar').classed('selected', d => e[0][0] <= this.x(d.year) && this.x(d.year) <= e[1][0] );
container.enter().append('g').classed(id, true) .each(function() { var s = d3.select(this); s.append('rect').classed('cbbg', true); s.append('g').classed('cbfills', true); s.append('g').classed('cblines', true); s.append('g').classed('cbaxis', true).classed('crisp', true); s.append('g').classed('cbtitleunshift', true) .append('g').classed('cbtitle', true); s.append('rect').classed('cboutline', true); s.select('.cbtitle').datum(0); });
isRangesSnapped() { return this.resizerRanges.classed("snapped"); }
d3.timeout(() => { d3.selectAll('.selected').classed('selected', false); }, this.transitionSpeed);
gScatterGeoTraces.each(function(trace) { var s = d3.select(this); if(!subTypes.hasLines(trace)) return; s.selectAll('path.js-line') .data([makeLineGeoJSON(trace)]) .enter().append('path') .classed('js-line', true); // TODO add hover - how? });
isRightSnapped() { return this.resizerRight.classed("snapped"); }
barsJoin.enter() // Enter .append('rect') .attr('x', d => this.x(+d.year)) .classed('bar', true)
isLeftSnapped() { return this.resizerLeft.classed("snapped"); }