(animate?)
| 274 | } |
| 275 | |
| 276 | update_position(animate?) { |
| 277 | const x_scale = this.scales.x, |
| 278 | y_scale = this.scales.y; |
| 279 | const animation_duration = |
| 280 | animate === true ? this.parent.model.get('animation_duration') : 0; |
| 281 | |
| 282 | this.d3el |
| 283 | .selectAll('.object_grp') |
| 284 | .transition('update_position') |
| 285 | .duration(animation_duration) |
| 286 | .attr('transform', (d: any) => { |
| 287 | return ( |
| 288 | 'translate(' + |
| 289 | (x_scale.scale(d.x) + x_scale.offset) + |
| 290 | ',' + |
| 291 | (y_scale.scale(d.y) + y_scale.offset) + |
| 292 | ')' + |
| 293 | this.get_element_rotation(d) |
| 294 | ); |
| 295 | }); |
| 296 | this.x_pixels = this.model.mark_data.map((el) => { |
| 297 | return x_scale.scale(el.x) + x_scale.offset; |
| 298 | }); |
| 299 | this.y_pixels = this.model.mark_data.map((el) => { |
| 300 | return y_scale.scale(el.y) + y_scale.offset; |
| 301 | }); |
| 302 | this.pixel_coords = this.model.mark_data.map((el) => { |
| 303 | return [ |
| 304 | x_scale.scale(el.x) + x_scale.offset, |
| 305 | y_scale.scale(el.y) + y_scale.offset, |
| 306 | ]; |
| 307 | }); |
| 308 | } |
| 309 | |
| 310 | draw(animate?) { |
| 311 | this.set_ranges(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…