Skip to content

Commit c11db27

Browse files
committed
move up cursorFocus const, fix esm build. close #169.
1 parent cb4a53b commit c11db27

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

dist/uPlot.cjs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,9 @@ function uPlot(opts, data, then) {
10311031

10321032
(cursor.points.show = fnOrSelf(cursor.points.show));
10331033

1034+
var focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);
1035+
var cursorFocus = focus.prox >= 0;
1036+
10341037
// series-intersection markers
10351038
var cursorPts = [null];
10361039

@@ -2019,9 +2022,6 @@ function uPlot(opts, data, then) {
20192022

20202023
var dragging = false;
20212024

2022-
var focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);
2023-
var cursorFocus = focus.prox >= 0;
2024-
20252025
var drag = cursor.drag;
20262026

20272027
if ( cursor.show) {

dist/uPlot.esm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,9 @@ function uPlot(opts, data, then) {
10341034

10351035
(cursor.points.show = fnOrSelf(cursor.points.show));
10361036

1037+
const focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);
1038+
const cursorFocus = focus.prox >= 0;
1039+
10371040
// series-intersection markers
10381041
let cursorPts = [null];
10391042

@@ -2011,9 +2014,6 @@ function uPlot(opts, data, then) {
20112014

20122015
let dragging = false;
20132016

2014-
const focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);
2015-
const cursorFocus = focus.prox >= 0;
2016-
20172017
const drag = cursor.drag;
20182018

20192019
if ( cursor.show) {

dist/uPlot.iife.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,9 @@ var uPlot = (function () {
10321032

10331033
(cursor.points.show = fnOrSelf(cursor.points.show));
10341034

1035+
var focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);
1036+
var cursorFocus = focus.prox >= 0;
1037+
10351038
// series-intersection markers
10361039
var cursorPts = [null];
10371040

@@ -2020,9 +2023,6 @@ var uPlot = (function () {
20202023

20212024
var dragging = false;
20222025

2023-
var focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);
2024-
var cursorFocus = focus.prox >= 0;
2025-
20262026
var drag = cursor.drag;
20272027

20282028
if ( cursor.show) {

0 commit comments

Comments
 (0)