MCPcopy Create free account
hub / github.com/Make-md/makemd / constructor

Method constructor

src/basics/tooltip.ts:54–62  ·  view source on GitHub ↗
(
    view: EditorView,
    private readonly facet: Facet<Tooltip | null>,
    private readonly createTooltipView: (tooltip: Tooltip) => TooltipView
  )

Source from the content-addressed store, hash-verified

52 tooltipViews: readonly TooltipView[];
53
54 constructor(
55 view: EditorView,
56 private readonly facet: Facet<Tooltip | null>,
57 private readonly createTooltipView: (tooltip: Tooltip) => TooltipView
58 ) {
59 this.input = view.state.facet(facet);
60 this.tooltips = this.input.filter((t) => t) as Tooltip[];
61 this.tooltipViews = this.tooltips.map(createTooltipView);
62 }
63
64 update(update: ViewUpdate) {
65 if (update.focusChanged && !update.view.hasFocus) {

Callers

nothing calls this directly

Calls 2

filterMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected