MCPcopy
hub / github.com/plotly/plotly.js / getMousePositions

Function getMousePositions

test/jasmine/tests/parcats_test.js:488–516  ·  view source on GitHub ↗
(parcatsViewModel)

Source from the content-addressed store, hash-verified

486 afterEach(destroyGraphDiv);
487
488 function getMousePositions(parcatsViewModel) {
489 // Compute Mouse positions
490 // -----------------------
491 // Start mouse in the middle of the dimension label on the
492 // second dimensions (dimension display index 1)
493 var dragDimStartX = parcatsViewModel.dimensions[1].x;
494 var mouseStartY = parcatsViewModel.y - 5;
495 var mouseStartX = parcatsViewModel.x + dragDimStartX + dimWidth / 2;
496
497 // Pause mouse half-way between the original location of
498 // the first and second dimensions. Also move mosue
499 // downward a bit to make sure drag 'sticks'
500 var mouseMidY = parcatsViewModel.y + 50;
501 var mouseMidX = mouseStartX + dimDx / 2;
502
503 // End mouse drag in the middle of the original
504 // position of the dimension label of the third dimension
505 // (dimension display index 2)
506 var mouseEndY = parcatsViewModel.y + 100;
507 var mouseEndX = parcatsViewModel.x + parcatsViewModel.dimensions[2].x + dimWidth / 2;
508 return {
509 mouseStartY: mouseStartY,
510 mouseStartX: mouseStartX,
511 mouseMidY: mouseMidY,
512 mouseMidX: mouseMidX,
513 mouseEndY: mouseEndY,
514 mouseEndX: mouseEndX
515 };
516 }
517
518 function checkInitialDimensions() {
519 checkDimensionCalc(gd, 0,

Callers 1

parcats_test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…