fix selection for filled shapes
This commit is contained in:
parent
eb234330dd
commit
45c0febdad
3 changed files with 16 additions and 18 deletions
|
@ -112,13 +112,13 @@ export class EllipseUtil extends TDShapeUtil<T, E> {
|
|||
className="tl-binding-indicator"
|
||||
cx={radiusX}
|
||||
cy={radiusY}
|
||||
rx={rx}
|
||||
ry={ry}
|
||||
rx={radiusX}
|
||||
ry={radiusY}
|
||||
strokeWidth={this.bindingDistance}
|
||||
/>
|
||||
)}
|
||||
<ellipse
|
||||
className={isSelected ? 'tl-fill-hitarea' : 'tl-stroke-hitarea'}
|
||||
className={style.isFilled || isSelected ? 'tl-fill-hitarea' : 'tl-stroke-hitarea'}
|
||||
cx={radiusX}
|
||||
cy={radiusY}
|
||||
rx={radiusX}
|
||||
|
@ -127,8 +127,8 @@ export class EllipseUtil extends TDShapeUtil<T, E> {
|
|||
<ellipse
|
||||
cx={radiusX}
|
||||
cy={radiusY}
|
||||
rx={radiusX}
|
||||
ry={radiusY}
|
||||
rx={rx}
|
||||
ry={ry}
|
||||
fill={styles.fill}
|
||||
stroke={styles.stroke}
|
||||
strokeWidth={sw}
|
||||
|
|
|
@ -123,18 +123,19 @@ export class RectangleUtil extends TDShapeUtil<T, E> {
|
|||
{isBinding && (
|
||||
<rect
|
||||
className="tl-binding-indicator"
|
||||
x={sw / 2 - 32}
|
||||
y={sw / 2 - 32}
|
||||
width={w + 64}
|
||||
height={h + 64}
|
||||
x={0}
|
||||
y={0}
|
||||
width={size[0]}
|
||||
height={size[1]}
|
||||
strokeWidth={this.bindingDistance}
|
||||
/>
|
||||
)}
|
||||
<rect
|
||||
className="tl-binding-indicator"
|
||||
x={sw / 2 - 32}
|
||||
y={sw / 2 - 32}
|
||||
width={w + 64}
|
||||
height={h + 64}
|
||||
className={isSelected || style.isFilled ? 'tl-fill-hitarea' : 'tl-stroke-hitarea'}
|
||||
x={sw / 2}
|
||||
y={sw / 2}
|
||||
width={w}
|
||||
height={h}
|
||||
strokeWidth={this.bindingDistance}
|
||||
/>
|
||||
{style.isFilled && (
|
||||
|
|
|
@ -125,11 +125,8 @@ export class TriangleUtil extends TDShapeUtil<T, E> {
|
|||
/>
|
||||
)}
|
||||
<polygon
|
||||
className={style.isFilled || isSelected ? 'tl-fill-hitarea' : 'tl-stroke-hitarea'}
|
||||
points={points.join()}
|
||||
fill={styles.fill}
|
||||
strokeWidth={sw}
|
||||
stroke="none"
|
||||
pointerEvents="all"
|
||||
/>
|
||||
<g pointerEvents="stroke">{paths}</g>
|
||||
</SVGContainer>
|
||||
|
|
Loading…
Reference in a new issue