Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add size to Scatter #13958

Merged
merged 13 commits into from
Sep 11, 2024
Prev Previous commit
Next Next commit
revert changes in glyph_renderers.ts
  • Loading branch information
mosc9575 committed Aug 25, 2024
commit 40cd12a85d57240e0b342df9d834649b5f93b7b9
19 changes: 2 additions & 17 deletions bokehjs/src/lib/models/renderers/glyph_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {Color} from "core/types"
import {Indices} from "core/types"
import type * as p from "core/properties"
import {filter} from "core/util/arrayable"
import {extend, clone, keys} from "core/util/object"
import {extend, clone} from "core/util/object"
import type {HitTestResult} from "core/hittest"
import type {Geometry} from "core/geometry"
import type {SelectionManager} from "core/selection_manager"
Expand Down Expand Up @@ -118,22 +118,7 @@ export class GlyphRendererView extends DataRendererView {

function glyph_from_mode(defaults: Defaults, glyph?: Glyph | "auto" | null): typeof base_glyph {
if (glyph instanceof Glyph) {
const attrs: any = clone(glyph_attrs)
const attrs_keys: any = keys(attrs)
const extra_glyph_attrs: any = clone({...glyph.attributes})
const extra_glyph_keys: any = keys(extra_glyph_attrs)
const default_glyph_attrs: any = clone({...new (glyph.constructor as any)().attributes})
for (const key of attrs_keys) {
if (key in extra_glyph_attrs === false) {
delete attrs[key]
}
}
for (const key of extra_glyph_keys) {
if (JSON.stringify(extra_glyph_attrs[key]) === JSON.stringify(default_glyph_attrs[key])) {
delete extra_glyph_attrs[key]
}
}
return new (glyph.constructor as any)({...attrs, ...extra_glyph_attrs})
return glyph
} else if (glyph == "auto") {
return mk_glyph(defaults)
}
Expand Down