@@ -42,6 +42,7 @@ import {
4242 DEFAULT_EASING ,
4343 DEFAULT_HEIGHT ,
4444 DEFAULT_LASSO_COLOR ,
45+ DEFAULT_LASSO_LINE_WIDTH ,
4546 DEFAULT_LASSO_MIN_DELAY ,
4647 DEFAULT_LASSO_MIN_DIST ,
4748 DEFAULT_LASSO_CLEAR_EVENT ,
@@ -204,6 +205,7 @@ const createScatterplot = (initialProperties = {}) => {
204205 deselectOnDblClick = DEFAULT_DESELECT_ON_DBL_CLICK ,
205206 deselectOnEscape = DEFAULT_DESELECT_ON_ESCAPE ,
206207 lassoColor = DEFAULT_LASSO_COLOR ,
208+ lassoLineWidth = DEFAULT_LASSO_LINE_WIDTH ,
207209 lassoMinDelay = DEFAULT_LASSO_MIN_DELAY ,
208210 lassoMinDist = DEFAULT_LASSO_MIN_DIST ,
209211 lassoClearEvent = DEFAULT_LASSO_CLEAR_EVENT ,
@@ -2034,6 +2036,14 @@ const createScatterplot = (initialProperties = {}) => {
20342036 lasso . setStyle ( { color : lassoColor } ) ;
20352037 } ;
20362038
2039+ const setLassoLineWidth = ( newLassoLineWidth ) => {
2040+ if ( Number . isNaN ( + newLassoLineWidth ) || + newLassoLineWidth < 1 ) return ;
2041+
2042+ lassoLineWidth = + newLassoLineWidth ;
2043+
2044+ lasso . setStyle ( { width : lassoLineWidth } ) ;
2045+ } ;
2046+
20372047 const setLassoMinDelay = ( newLassoMinDelay ) => {
20382048 if ( ! + newLassoMinDelay ) return ;
20392049
@@ -2290,6 +2300,7 @@ const createScatterplot = (initialProperties = {}) => {
22902300 if ( property === 'deselectOnEscape' ) return deselectOnEscape ;
22912301 if ( property === 'height' ) return height ;
22922302 if ( property === 'lassoColor' ) return lassoColor ;
2303+ if ( property === 'lassoLineWidth' ) return lassoLineWidth ;
22932304 if ( property === 'lassoMinDelay' ) return lassoMinDelay ;
22942305 if ( property === 'lassoMinDist' ) return lassoMinDist ;
22952306 if ( property === 'lassoClearEvent' ) return lassoClearEvent ;
@@ -2494,6 +2505,10 @@ const createScatterplot = (initialProperties = {}) => {
24942505 setLassoColor ( properties . lassoColor ) ;
24952506 }
24962507
2508+ if ( properties . lassoLineWidth !== undefined ) {
2509+ setLassoLineWidth ( properties . lassoLineWidth ) ;
2510+ }
2511+
24972512 if ( properties . lassoMinDelay !== undefined ) {
24982513 setLassoMinDelay ( properties . lassoMinDelay ) ;
24992514 }
@@ -2708,7 +2723,11 @@ const createScatterplot = (initialProperties = {}) => {
27082723 initCamera ( ) ;
27092724 updateScales ( ) ;
27102725
2711- lasso = createLine ( regl , { color : lassoColor , width : 3 , is2d : true } ) ;
2726+ lasso = createLine ( regl , {
2727+ color : lassoColor ,
2728+ width : lassoLineWidth ,
2729+ is2d : true ,
2730+ } ) ;
27122731 pointConnections = createLine ( regl , {
27132732 color : pointConnectionColor ,
27142733 colorHover : pointConnectionColorHover ,
0 commit comments