Skip to content

Commit

Permalink
compat: Support Bokeh 3.6 (#750)
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Paprocki <[email protected]>
  • Loading branch information
hoxbro and mattpap authored Dec 16, 2024
1 parent e8586a1 commit ee088ab
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1,457 deletions.
3 changes: 0 additions & 3 deletions geoviews/models/poly_draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {PolyDrawTool, PolyDrawToolView} from "@bokehjs/models/tools/edit/poly_dr

import type {MultiLine} from "@bokehjs/models/glyphs/multi_line"
import type {Patches} from "@bokehjs/models/glyphs/patches"
import type {GlyphRenderer} from "@bokehjs/models/renderers/glyph_renderer"

export class PolyVertexDrawToolView extends PolyDrawToolView {
declare model: PolyVertexDrawTool
Expand Down Expand Up @@ -209,8 +208,6 @@ export interface HasPolyGlyph {
export class PolyVertexDrawTool extends PolyDrawTool {
declare properties: PolyVertexDrawTool.Props

override renderers: (GlyphRenderer & HasPolyGlyph)[]

constructor(attrs?: Partial<PolyVertexDrawTool.Attrs>) {
super(attrs)
}
Expand Down
10 changes: 4 additions & 6 deletions geoviews/models/poly_edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import type {Dict} from "@bokehjs/core/types"
import type {GestureEvent, UIEvent, TapEvent} from "@bokehjs/core/ui_events"
import {entries} from "@bokehjs/core/util/object"
import {isArray} from "@bokehjs/core/util/types"
import type {XYGlyph} from "@bokehjs/models/glyphs/xy_glyph"
import type {MultiLine} from "@bokehjs/models/glyphs/multi_line"
import type {Patches} from "@bokehjs/models/glyphs/patches"
import type {GlyphRenderer} from "@bokehjs/models/renderers/glyph_renderer"
import type {HasXYGlyph} from "@bokehjs/models/tools/edit/edit_tool"
import {PolyEditTool, PolyEditToolView} from "@bokehjs/models/tools/edit/poly_edit_tool"

export interface HasPolyGlyph {
glyph: MultiLine | Patches
}
export type XsYsGlyph = MultiLine | Patches

export class PolyVertexEditToolView extends PolyEditToolView {
declare model: PolyVertexEditTool
Expand Down Expand Up @@ -55,7 +53,7 @@ export class PolyVertexEditToolView extends PolyEditToolView {
this._basepoint = null
}

override _drag_points(ev: UIEvent, renderers: (GlyphRenderer & HasXYGlyph)[]): number[][] {
override _drag_points(ev: UIEvent, renderers: GlyphRenderer<XYGlyph>[]): number[][] {
if (this._basepoint == null) {
return []
}
Expand Down Expand Up @@ -262,7 +260,7 @@ export interface PolyVertexEditTool extends PolyVertexEditTool.Attrs {}
export class PolyVertexEditTool extends PolyEditTool {
declare properties: PolyVertexEditTool.Props

override renderers: (GlyphRenderer & HasPolyGlyph)[]
override renderers: GlyphRenderer<XsYsGlyph>[]

constructor(attrs?: Partial<PolyVertexEditTool.Attrs>) {
super(attrs)
Expand Down
Loading

0 comments on commit ee088ab

Please sign in to comment.