Skip to content

Commit c69244f

Browse files
committed
simplify controllers - no need for invisible draggers
1 parent efc85d6 commit c69244f

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

src/components/shapes/draw_newshape/display_outlines.js

+9-20
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ var drawMode = dragHelpers.drawMode;
1515

1616
var Registry = require('../../../registry');
1717

18-
var MINSELECT = require('../../../plots/cartesian/constants').MINSELECT;
1918
var constants = require('./constants');
2019
var i000 = constants.i000;
2120
var i090 = constants.i090;
@@ -69,7 +68,6 @@ module.exports = function displayOutlines(polygons, outlines, dragOptions, nCall
6968
outlines.attr('d', writePaths(polygons));
7069

7170
// add controllers
72-
var rVertexController = MINSELECT * 1.5; // bigger vertex buttons
7371
var vertexDragOptions;
7472
var shapeDragOptions;
7573
var indexI; // cell index
@@ -206,28 +204,19 @@ module.exports = function displayOutlines(polygons, outlines, dragOptions, nCall
206204
var x = cell[j][1];
207205
var y = cell[j][2];
208206

209-
var rIcon = 3;
210-
g.append('circle')
211-
.attr('cx', x)
212-
.attr('cy', y)
213-
.attr('r', rIcon)
214-
.style({
215-
'mix-blend-mode': 'luminosity',
216-
fill: 'black',
217-
stroke: 'white',
218-
'stroke-width': 1
219-
});
220-
221207
var vertex = g.append('circle')
222208
.classed('cursor-grab', true)
223209
.attr('data-i', i)
224210
.attr('data-j', j)
225-
.attr('cx', x)
226-
.attr('cy', y)
227-
.attr('r', rVertexController)
228-
.style({
229-
opacity: 0
230-
});
211+
.attr('cx', x)
212+
.attr('cy', y)
213+
.attr('r', 4)
214+
.style({
215+
'mix-blend-mode': 'luminosity',
216+
fill: 'black',
217+
stroke: 'white',
218+
'stroke-width': 1
219+
});
231220

232221
vertexDragOptions[i][j] = {
233222
element: vertex.node(),

0 commit comments

Comments
 (0)