()
| 750 | } |
| 751 | |
| 752 | compute_view_padding(): void { |
| 753 | //This function sets the padding for the view through the variables |
| 754 | //xPadding and yPadding which are view specific paddings in pixel |
| 755 | let xPadding; |
| 756 | if (this.model.get('marker')) { |
| 757 | const markerPadding = Math.sqrt(this.model.get('marker_size')) / 2 + 1.0; |
| 758 | const linePadding = this.model.get('stroke_width') / 2.0; |
| 759 | xPadding = Math.max(markerPadding, linePadding); |
| 760 | } else { |
| 761 | xPadding = this.model.get('stroke_width') / 2.0; |
| 762 | } |
| 763 | |
| 764 | const yPadding = xPadding; |
| 765 | if (xPadding !== this.xPadding || yPadding !== this.yPadding) { |
| 766 | this.xPadding = xPadding; |
| 767 | this.yPadding = yPadding; |
| 768 | this.trigger('mark_padding_updated'); |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | update_marker_style() { |
| 773 | const that = this; |
no outgoing calls
no test coverage detected