()
| 459 | } |
| 460 | |
| 461 | draw() { |
| 462 | this.set_ranges(); |
| 463 | |
| 464 | const rowScale = this.scales.row; |
| 465 | const columnScale = this.scales.column; |
| 466 | |
| 467 | const rowStartAligned = this.model.get('row_align') === 'start'; |
| 468 | const colStartAligned = this.model.get('column_align') === 'start'; |
| 469 | let new_domain; |
| 470 | |
| 471 | if ( |
| 472 | this.model.modes.row !== AxisMode.Middle && |
| 473 | this.model.modes.row !== AxisMode.Boundaries |
| 474 | ) { |
| 475 | new_domain = this.expandScaleDomain( |
| 476 | rowScale, |
| 477 | this.model.rows, |
| 478 | this.model.modes.row, |
| 479 | rowStartAligned |
| 480 | ); |
| 481 | if ( |
| 482 | d3.min(new_domain) < d3.min(rowScale.model.domain) || |
| 483 | d3.max(new_domain) > d3.max(rowScale.model.domain) |
| 484 | ) { |
| 485 | // Update domain if domain has changed |
| 486 | rowScale.model.computeAndSetDomain(new_domain, rowScale.model.model_id); |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | if ( |
| 491 | this.model.modes.column !== AxisMode.Middle && |
| 492 | this.model.modes.column !== AxisMode.Boundaries |
| 493 | ) { |
| 494 | new_domain = this.expandScaleDomain( |
| 495 | columnScale, |
| 496 | this.model.columns, |
| 497 | this.model.modes.column, |
| 498 | colStartAligned |
| 499 | ); |
| 500 | if ( |
| 501 | d3.min(new_domain) < d3.min(columnScale.model.domain) || |
| 502 | d3.max(new_domain) > d3.max(columnScale.model.domain) |
| 503 | ) { |
| 504 | // Update domain if domain has changed |
| 505 | columnScale.model.computeAndSetDomain( |
| 506 | new_domain, |
| 507 | columnScale.model.model_id |
| 508 | ); |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | const rowPlotData = this.getTilePlottingData( |
| 513 | rowScale, |
| 514 | this.model.rows, |
| 515 | this.model.modes.row, |
| 516 | rowStartAligned |
| 517 | ); |
| 518 | const columnPlotData = this.getTilePlottingData( |
no test coverage detected