Skip to content

Commit 3139166

Browse files
committed
Merge branch 'fil/brush-x' into fil/brush-data-options
2 parents 04746ca + b6eb54a commit 3139166

File tree

9 files changed

+36
-36
lines changed

9 files changed

+36
-36
lines changed

src/interactions/brush.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export class Brush extends Mark {
7171
let snapping;
7272
_brush
7373
.extent([
74-
[dimensions.marginLeft - 1, dimensions.marginTop - 1],
75-
[dimensions.width - dimensions.marginRight + 1, dimensions.height - dimensions.marginBottom + 1]
74+
[dimensions.marginLeft - (dim !== "y"), dimensions.marginTop - (dim !== "x")],
75+
[dimensions.width - dimensions.marginRight + (dim !== "y"), dimensions.height - dimensions.marginBottom + (dim !== "x")]
7676
])
7777
.on("start brush end", function (event) {
7878
if (syncing) return;

test/output/brushXDot.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
<text transform="translate(620,140)">body_mass_g →</text>
3636
</g>
3737
<g aria-label="brush" fill="none" pointer-events="all">
38-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="19" y="9" width="602" height="132"></rect>
39-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="103.333" y="9" width="266.667" height="132"></rect>
40-
<rect class="handle handle--w" cursor="ew-resize" style="" x="100.333" y="6" width="6" height="138"></rect>
41-
<rect class="handle handle--e" cursor="ew-resize" style="" x="367" y="6" width="6" height="138"></rect>
38+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="19" y="10" width="602" height="130"></rect>
39+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="103.333" y="10" width="266.667" height="130"></rect>
40+
<rect class="handle handle--w" cursor="ew-resize" style="" x="100.333" y="7" width="6" height="136"></rect>
41+
<rect class="handle handle--e" cursor="ew-resize" style="" x="367" y="7" width="6" height="136"></rect>
4242
</g>
4343
<g aria-label="dot" pointer-events="none" transform="translate(0.5,0.5)"></g>
4444
<g aria-label="dot" fill="#ccc" pointer-events="none" transform="translate(0.5,0.5)">

test/output/brushXHistogram.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666
<text transform="translate(620,370)">body_mass_g →</text>
6767
</g>
6868
<g aria-label="brush" fill="none" pointer-events="all">
69-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="582" height="352"></rect>
70-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="166.973" y="19" width="227.297" height="352"></rect>
71-
<rect class="handle handle--w" cursor="ew-resize" style="" x="163.973" y="16" width="6" height="358"></rect>
72-
<rect class="handle handle--e" cursor="ew-resize" style="" x="391.27" y="16" width="6" height="358"></rect>
69+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="582" height="350"></rect>
70+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="166.973" y="20" width="227.297" height="350"></rect>
71+
<rect class="handle handle--w" cursor="ew-resize" style="" x="163.973" y="17" width="6" height="356"></rect>
72+
<rect class="handle handle--e" cursor="ew-resize" style="" x="391.27" y="17" width="6" height="356"></rect>
7373
</g>
7474
<g aria-label="rect" fill-opacity="0.8" pointer-events="none"></g>
7575
<g aria-label="rect" fill-opacity="0.3" pointer-events="none">

test/output/brushXHistogramFaceted.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,19 @@
148148
</g>
149149
<g aria-label="brush">
150150
<g fill="none" pointer-events="all" transform="translate(0,0)">
151-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="562" height="135"></rect>
152-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="161.081" y="19" width="227.027" height="135"></rect>
153-
<rect class="handle handle--w" cursor="ew-resize" style="" x="158.081" y="16" width="6" height="141"></rect>
154-
<rect class="handle handle--e" cursor="ew-resize" style="" x="385.108" y="16" width="6" height="141"></rect>
151+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="562" height="133"></rect>
152+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="161.081" y="20" width="227.027" height="133"></rect>
153+
<rect class="handle handle--w" cursor="ew-resize" style="" x="158.081" y="17" width="6" height="139"></rect>
154+
<rect class="handle handle--e" cursor="ew-resize" style="" x="385.108" y="17" width="6" height="139"></rect>
155155
</g>
156156
<g fill="none" pointer-events="all" transform="translate(0,148)">
157-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="562" height="135"></rect>
157+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="562" height="133"></rect>
158158
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="display: none;"></rect>
159159
<rect class="handle handle--w" cursor="ew-resize" style="display: none;"></rect>
160160
<rect class="handle handle--e" cursor="ew-resize" style="display: none;"></rect>
161161
</g>
162162
<g fill="none" pointer-events="all" transform="translate(0,296)">
163-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="562" height="135"></rect>
163+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="562" height="133"></rect>
164164
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="display: none;"></rect>
165165
<rect class="handle handle--w" cursor="ew-resize" style="display: none;"></rect>
166166
<rect class="handle handle--e" cursor="ew-resize" style="display: none;"></rect>

test/output/brushXLine.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
<text y="0.71em" transform="translate(578.662,370)">2018</text>
6464
</g>
6565
<g aria-label="brush" fill="none" pointer-events="all">
66-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="582" height="352"></rect>
67-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="230.154" y="19" width="164.397" height="352"></rect>
68-
<rect class="handle handle--w" cursor="ew-resize" style="" x="227.154" y="16" width="6" height="358"></rect>
69-
<rect class="handle handle--e" cursor="ew-resize" style="" x="391.55" y="16" width="6" height="358"></rect>
66+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="582" height="350"></rect>
67+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="230.154" y="20" width="164.397" height="350"></rect>
68+
<rect class="handle handle--w" cursor="ew-resize" style="" x="227.154" y="17" width="6" height="356"></rect>
69+
<rect class="handle handle--e" cursor="ew-resize" style="" x="391.55" y="17" width="6" height="356"></rect>
7070
</g>
7171
<g aria-label="line" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" pointer-events="none" transform="translate(0.5,0.5)"></g>
7272
<g aria-label="line" fill="none" stroke="#ccc" stroke-width="0.5" stroke-linejoin="round" stroke-linecap="round" pointer-events="none" transform="translate(0.5,0.5)">

test/output/brushXTemporal.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@
6767
<text y="0.71em" transform="translate(572.838,370)">2018</text>
6868
</g>
6969
<g aria-label="brush" fill="none" pointer-events="all">
70-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="582" height="352"></rect>
71-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="163.683" y="19" width="114.001" height="352"></rect>
72-
<rect class="handle handle--w" cursor="ew-resize" style="" x="160.683" y="16" width="6" height="358"></rect>
73-
<rect class="handle handle--e" cursor="ew-resize" style="" x="274.684" y="16" width="6" height="358"></rect>
70+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="582" height="350"></rect>
71+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="163.683" y="20" width="114.001" height="350"></rect>
72+
<rect class="handle handle--w" cursor="ew-resize" style="" x="160.683" y="17" width="6" height="356"></rect>
73+
<rect class="handle handle--e" cursor="ew-resize" style="" x="274.684" y="17" width="6" height="356"></rect>
7474
</g>
7575
<g aria-label="rect" fill-opacity="0.8" pointer-events="none"></g>
7676
<g aria-label="rect" fill-opacity="0.3" pointer-events="none">

test/output/brushXTemporalReversed.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@
6767
<text y="0.71em" transform="translate(543.479,370)">2014</text>
6868
</g>
6969
<g aria-label="brush" fill="none" pointer-events="all">
70-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="582" height="352"></rect>
71-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="382.316" y="19" width="114.001" height="352"></rect>
72-
<rect class="handle handle--w" cursor="ew-resize" style="" x="379.316" y="16" width="6" height="358"></rect>
73-
<rect class="handle handle--e" cursor="ew-resize" style="" x="493.317" y="16" width="6" height="358"></rect>
70+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="20" width="582" height="350"></rect>
71+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="382.316" y="20" width="114.001" height="350"></rect>
72+
<rect class="handle handle--w" cursor="ew-resize" style="" x="379.316" y="17" width="6" height="356"></rect>
73+
<rect class="handle handle--e" cursor="ew-resize" style="" x="493.317" y="17" width="6" height="356"></rect>
7474
</g>
7575
<g aria-label="rect" fill-opacity="0.8" pointer-events="none"></g>
7676
<g aria-label="rect" fill-opacity="0.3" pointer-events="none">

test/output/brushYDot.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
<text transform="translate(620,370)">culmen_length_mm →</text>
5555
</g>
5656
<g aria-label="brush" fill="none" pointer-events="all">
57-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="582" height="352"></rect>
58-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="39" y="82.5" width="582" height="208.333"></rect>
59-
<rect class="handle handle--n" cursor="ns-resize" style="" x="36" y="79.5" width="588" height="6"></rect>
60-
<rect class="handle handle--s" cursor="ns-resize" style="" x="36" y="287.833" width="588" height="6"></rect>
57+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="40" y="19" width="580" height="352"></rect>
58+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="40" y="82.5" width="580" height="208.333"></rect>
59+
<rect class="handle handle--n" cursor="ns-resize" style="" x="37" y="79.5" width="586" height="6"></rect>
60+
<rect class="handle handle--s" cursor="ns-resize" style="" x="37" y="287.833" width="586" height="6"></rect>
6161
</g>
6262
<g aria-label="dot" pointer-events="none" transform="translate(0.5,0.5)"></g>
6363
<g aria-label="dot" fill="#ccc" pointer-events="none" transform="translate(0.5,0.5)">

test/output/brushYHistogram.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@
7777
<text transform="translate(620,370)">Frequency →</text>
7878
</g>
7979
<g aria-label="brush" fill="none" pointer-events="all">
80-
<rect class="overlay" pointer-events="all" cursor="crosshair" x="39" y="19" width="582" height="352"></rect>
81-
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="39" y="175.556" width="582" height="116.667"></rect>
82-
<rect class="handle handle--n" cursor="ns-resize" style="" x="36" y="172.556" width="588" height="6"></rect>
83-
<rect class="handle handle--s" cursor="ns-resize" style="" x="36" y="289.222" width="588" height="6"></rect>
80+
<rect class="overlay" pointer-events="all" cursor="crosshair" x="40" y="19" width="580" height="352"></rect>
81+
<rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" style="" x="40" y="175.556" width="580" height="116.667"></rect>
82+
<rect class="handle handle--n" cursor="ns-resize" style="" x="37" y="172.556" width="586" height="6"></rect>
83+
<rect class="handle handle--s" cursor="ns-resize" style="" x="37" y="289.222" width="586" height="6"></rect>
8484
</g>
8585
<g aria-label="rect" fill-opacity="0.8" pointer-events="none"></g>
8686
<g aria-label="rect" fill-opacity="0.3" pointer-events="none">

0 commit comments

Comments
 (0)