(opts?: Partial<IMarkmapOptions>)
| 271 | } |
| 272 | |
| 273 | setOptions(opts?: Partial<IMarkmapOptions>): void { |
| 274 | this.options = { |
| 275 | ...this.options, |
| 276 | ...opts, |
| 277 | }; |
| 278 | if (this.options.zoom) { |
| 279 | this.svg.call(this.zoom); |
| 280 | } else { |
| 281 | this.svg.on('.zoom', null); |
| 282 | } |
| 283 | if (this.options.pan) { |
| 284 | this.svg.on('wheel', this.handlePan); |
| 285 | } else { |
| 286 | this.svg.on('wheel', null); |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | async setData(data?: IPureNode | null, opts?: Partial<IMarkmapOptions>) { |
| 291 | if (opts) this.setOptions(opts); |
no test coverage detected