MCPcopy
hub / github.com/terwanerik/ScrollTrigger / remove

Method remove

src/scripts/TriggerCollection.js:39–55  ·  view source on GitHub ↗

* Removes one or multiple Trigger objects * @param {Trigger|Trigger[]} objects

(objects)

Source from the content-addressed store, hash-verified

37 * @param {Trigger|Trigger[]} objects
38 */
39 remove(objects) {
40 if (objects instanceof Trigger) {
41 objects = [objects]
42 }
43
44 this.triggers = this.triggers.filter((trigger) => {
45 let hit = false
46
47 objects.each((object) => {
48 if (object == trigger) {
49 hit = true
50 }
51 })
52
53 return !hit
54 })
55 }
56
57 /**
58 * Lookup one or multiple triggers by a query string

Callers 1

_toggleClassMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected