Skip to content

Commit

Permalink
Fix hover support for issue markers (eclipse-glsp#281)
Browse files Browse the repository at this point in the history
Ensure that hover support for manually constructed issue markers works as expected.
  • Loading branch information
tortmayr authored and holkerveen committed Dec 21, 2024
1 parent a5d5732 commit aea7807
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/features/hover/hover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class GlspHoverMouseListener extends HoverMouseListener implements IActio
this.state.mouseOverTimer = window.setTimeout(() => {
const popupBounds = this.computePopupBounds(target, { x: event.pageX, y: event.pageY });
if (target instanceof GIssueMarker) {
resolve(SetPopupModelAction.create(this.createPopupModel(target as GIssueMarker, popupBounds)));
resolve(SetPopupModelAction.create(this.createPopupModel(target, popupBounds)));
} else {
resolve(RequestPopupModelAction.create({ elementId: target.id, bounds: popupBounds }));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/views/base-view-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
SCompartmentView,
SEdge,
SGraphView,
SIssueMarker,
SLabel,
SLabelView,
SNode,
Expand All @@ -49,6 +48,7 @@ import {
moveFeature,
selectFeature
} from '~glsp-sprotty';
import { GIssueMarker } from '../features/validation/issue-marker';
import { GLSPGraph } from '../lib/model';
import { GEdgeView } from './glsp-edge-view';
import { GIssueMarkerView } from './issue-marker-view';
Expand Down Expand Up @@ -86,7 +86,7 @@ export function configureDefaultModelElements(context: Pick<BindingContext, 'bin

// UI elements
configureModelElement(context, DefaultTypes.BUTTON_EXPAND, SButton, ExpandButtonView);
configureModelElement(context, DefaultTypes.ISSUE_MARKER, SIssueMarker, GIssueMarkerView);
configureModelElement(context, DefaultTypes.ISSUE_MARKER, GIssueMarker, GIssueMarkerView);

// shapes
configureModelElement(context, DefaultTypes.NODE_CIRCLE, CircularNode, CircularNodeView);
Expand Down

0 comments on commit aea7807

Please sign in to comment.