Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
state.yScale.domain().indexOf(state.yScale.invert(d))
+ ((state.zoomY && state.zoomY[0])?state.zoomY[0]:0)
);
const changeX=((newDomainX[1] - newDomainX[0])>(60*1000)); // Zoom damper
const changeY=(newDomainY[0]!=state.zoomY[0] || newDomainY[1]!=state.zoomY[1]);
if (changeX || changeY) {
state.svg.dispatch('zoom', { detail: {
zoomX: changeX?newDomainX:null,
zoomY: changeY?newDomainY:null
}});
}
}, true);
d3Event.stopPropagation();
});
function keydown() {
if (d3_event.keyCode === 93) { // context menu
d3_event.preventDefault();
d3_event.stopPropagation();
down.menu = d3_event.timeStamp;
tooltip.classed('rightclick', true);
}
}
function eventCancel() {
d3_event.stopPropagation();
d3_event.preventDefault();
}
.on("dblclick", () => {
d3Event.stopPropagation();
delete this.rootExtent;
this.resetZoom();
})
;
.on("dblclick", function (d) {
if (this._focus !== d) {
context.zoom(d);
}
d3Event.stopPropagation();
})
;
.on('click', function() {
d3_event.stopPropagation();
if (!operation || operation.disabled()) return;
button.call(tooltipBehavior.hide);
operation();
})
.call(svgIcon('#' + tool.iconName, tool.iconClass));
function removeMultikey(d) {
d3_event.stopPropagation();
var t = {};
if (isMulti) {
t[d.key] = undefined;
} else if (isSemi) {
_remove(multiData, function(md) { return md.key === d.key; });
var arr = multiData.map(function(md) { return md.key; });
arr = _compact(_uniq(arr));
t[field.key] = arr.length ? arr.join(';') : undefined;
}
dispatch.call('change', this, t);
}
.on('click', (d: any) => {
event.stopPropagation();
const container = document.getElementById('app');
const coordinates = mouse(container);
select('#nodeFilter').select('.dropdown-menu')
.style('transform', 'translate(' + (coordinates[0] - 430) + 'px,35px)');
select('#nodeFilter').select('.open').style('visibility', 'visible');
let menuItems = select('#nodeFilter').select('.dropdown-menu').selectAll('.demoAttr')
.data(this.labelProperties[d.name].sort((a, b) => a < b ? -1 : 1));
const menuItemsEnter = menuItems.enter()
.append('li')
.append('a')
.attr('class', 'dropdown-item demoAttr');
function eventCancel() {
d3_event.stopPropagation();
d3_event.preventDefault();
}
function contextmenu() {
d3_event.preventDefault();
d3_event.stopPropagation();
if (!down[2] && !down.menu) {
tooltip.classed('rightclick', true);
window.setTimeout(function() {
tooltip.classed('rightclick', false);
}, minTime);
dispatch.call('click', this, 'right');
}
}