Skip to content

Commit

Permalink
Make the histogram's rendered svg responsive to changes in the compon…
Browse files Browse the repository at this point in the history
…ent width/height props (#22)
  • Loading branch information
latonv authored Apr 18, 2023
1 parent 032db37 commit f1673d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/dist/src/histogram-date-range.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export let HistogramDateRange = class extends LitElement {
super.disconnectedCallback();
}
updated(changedProps) {
if (changedProps.has("bins") || changedProps.has("minDate") || changedProps.has("maxDate") || changedProps.has("minSelectedDate") || changedProps.has("maxSelectedDate")) {
if (changedProps.has("bins") || changedProps.has("minDate") || changedProps.has("maxDate") || changedProps.has("minSelectedDate") || changedProps.has("maxSelectedDate") || changedProps.has("width") || changedProps.has("height")) {
this.handleDataUpdate();
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/histogram-date-range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export class HistogramDateRange extends LitElement {
changedProps.has('minDate') ||
changedProps.has('maxDate') ||
changedProps.has('minSelectedDate') ||
changedProps.has('maxSelectedDate')
changedProps.has('maxSelectedDate') ||
changedProps.has('width') ||
changedProps.has('height')
) {
this.handleDataUpdate();
}
Expand Down

0 comments on commit f1673d3

Please sign in to comment.