Skip to content

Commit

Permalink
#4884 – Fix hovering over both attachment point and bond leading to b…
Browse files Browse the repository at this point in the history
…linking
  • Loading branch information
svvald committed Aug 20, 2024
1 parent b42ef58 commit 7b5157c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ketcher-core/src/domain/AttachmentPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export class AttachmentPoint {
monomerCenter: Coordinates,
attachmentPointCenter: Coordinates,
angleDegrees: number,
hasBond: boolean,
) {
if (!this.element) {
return;
Expand Down Expand Up @@ -191,7 +192,7 @@ export class AttachmentPoint {
.attr('stroke-width', '1px')
.attr('fill', '#0097A8')
.style('opacity', '0')
.style('pointer-events', 'auto')
.style('pointer-events', hasBond ? 'none' : 'auto')
.attr(
'transform',
`translate(${attachmentPointCenter.x},${attachmentPointCenter.y})rotate(${rotation})`,
Expand Down Expand Up @@ -263,6 +264,7 @@ export class AttachmentPoint {
attachmentToCenterCoordinates,
attachmentPointCoordinates,
angleDegrees,
Boolean(polymerBond),
);

this.hoverableArea = hoverableArea;
Expand Down

0 comments on commit 7b5157c

Please sign in to comment.