MCPcopy
hub / github.com/fabricjs/fabric.js / toggle

Method toggle

src/CommonMethods.ts:46–52  ·  view source on GitHub ↗

* Toggles specified property from `true` to `false` or from `false` to `true` * @param {String} property Property to toggle

(property: string)

Source from the content-addressed store, hash-verified

44 * @param {String} property Property to toggle
45 */
46 toggle(property: string) {
47 const value = this.get(property);
48 if (typeof value === 'boolean') {
49 this.set(property, !value);
50 }
51 return this;
52 }
53
54 /**
55 * Basic getter

Callers 2

appendResultsFunction · 0.80
object.jsFile · 0.80

Calls 2

getMethod · 0.95
setMethod · 0.95

Tested by

no test coverage detected