8000 Redesign "materialization" of data specs by mattpap · Pull Request #10235 · bokeh/bokeh · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7b2c9d5
Explicitly define glyph coordinates
mattpap Jun 14, 2020
49fbf63
Add default values
mattpap Jun 26, 2020
2511c9d
Don't check for nulls in MultiLine._index_data()
mattpap Jun 26, 2020
5f03f5a
Wrap only plain object default values
mattpap Jun 26, 2020
6d12421
Make data projection explicit
mattpap Jun 26, 2020
9196019
Clean up HexTile._set_data()
mattpap Jun 26, 2020
8f3a4e0
Add support for ragged arrays
mattpap Jun 26, 2020
f267b68
Encode dimension in coordinate specs
mattpap Jun 26, 2020
1be6b51
Explicit data materialization
mattpap Jun 27, 2020
35ec95a
Update incomplete unit tests
mattpap Jun 27, 2020
e2c650c
Update graph layout providers
mattpap Jul 5, 2020
b20dfb7
Fail safe when a column is missing
mattpap Jul 5, 2020
66549c6
Use NumberArray.set() in ImageURL
mattpap Jun 24, 2020
7f79d55
Update incomplete glyph tests
mattpap Jul 5, 2020
bc46b45
Assert number arrays in corner cases
mattpap Jul 5, 2020
84a3d68
Fix glyphs' defaults
mattpap Jul 5, 2020
54d988e
Explicit defaults in {V,H}Bar glyphs
mattpap Jul 5, 2020
361686b
Respect packed colors in webgl backend
mattpap Jul 5, 2020
3569c22
Unify handling of colors and alpha
mattpap Jul 6, 2020
e059b4a
Use CoordinateSeqSeqSeqSpec for multi polygons
mattpap Jul 6, 2020
709eed9
Make toStringTag static
mattpap Jul 6, 2020
fbf4f0c
Increase pixel allowance
mattpap Jul 7, 2020
5f1c988
Respect glyph protocol in graph renderer
mattpap Jul 8, 2020
81aa324
Ignore early glyph positional defaults
mattpap Jul 9, 2020
d19f28c
Mark export selenium tests as flaky
mattpap Jul 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up HexTile._set_data()
  • Loading branch information
mattpap committed Jul 8, 2020
commit 9196019031f8b015a12a88eae21dd4090130e805
10 changes: 5 additions & 5 deletions bokehjs/src/lib/models/glyphs/hex_tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ export class HexTileView extends GlyphView {
protected _set_data(): void {
const n = this._q.length

const size = this.model.size
const aspect_scale = this.model.aspect_scale
const {orientation, size, aspect_scale} = this.model

this._x = new NumberArray(n)
this._y = new NumberArray(n)

if (this.model.orientation == "pointytop") {
const sqrt3 = Math.sqrt(3)
if (orientation == "pointytop") {
for (let i = 0; i < n; i++) {
this._x[i] = size * Math.sqrt(3) * (this._q[i] + this._r[i]/2) / aspect_scale
this._x[i] = size * sqrt3 * (this._q[i] + this._r[i]/2) / aspect_scale
this._y[i] = -size * 3/2 * this._r[i]
}
} else {
for (let i = 0; i < n; i++) {
this._x[i] = size * 3/2 * this._q[i]
this._y[i] = -size * Math.sqrt(3) * (this._r[i] + this._q[i]/2) * aspect_scale
this._y[i] = -size * sqrt3 * (this._r[i] + this._q[i]/2) * aspect_scale
}
}
}
Expand Down
0