* Returns a new options object with the same properties as "this". Properties * from "extension" will be copied to the new options object.
(extension)
| 4843 | |
| 4844 | |
| 4845 | extend(extension) { |
| 4846 | const data = { |
| 4847 | style: this.style, |
| 4848 | size: this.size, |
| 4849 | textSize: this.textSize, |
| 4850 | color: this.color, |
| 4851 | phantom: this.phantom, |
| 4852 | font: this.font, |
| 4853 | fontFamily: this.fontFamily, |
| 4854 | fontWeight: this.fontWeight, |
| 4855 | fontShape: this.fontShape, |
| 4856 | maxSize: this.maxSize |
| 4857 | }; |
| 4858 | |
| 4859 | for (const key in extension) { |
| 4860 | if (extension.hasOwnProperty(key)) { |
| 4861 | data[key] = extension[key]; |
| 4862 | } |
| 4863 | } |
| 4864 | |
| 4865 | return new Options(data); |
| 4866 | } |
| 4867 | /** |
| 4868 | * Return an options object with the given style. If `this.style === style`, |
| 4869 | * returns `this`. |
no outgoing calls
no test coverage detected