(parsed: ParsedDocument, op: EditOp)
| 235 | } |
| 236 | |
| 237 | function applyGsapOp(parsed: ParsedDocument, op: EditOp): MutationResult | undefined { |
| 238 | const kf = applyGsapKeyframeOp(parsed, op); |
| 239 | if (kf !== undefined) return kf; |
| 240 | const arc = applyArcPathOp(parsed, op); |
| 241 | if (arc !== undefined) return arc; |
| 242 | const wkf = applyGsapWithKeyframesOp(parsed, op); |
| 243 | if (wkf !== undefined) return wkf; |
| 244 | switch (op.type) { |
| 245 | case "addGsapTween": |
| 246 | return handleAddGsapTween(parsed, op.target, op.tween); |
| 247 | case "setGsapTween": |
| 248 | return handleSetGsapTween(parsed, op.animationId, op.properties); |
| 249 | case "removeGsapProperty": |
| 250 | return handleRemoveGsapProperty(parsed, op.animationId, op.property, op.from); |
| 251 | case "removeGsapTween": |
| 252 | return handleRemoveGsapTween(parsed, op.animationId); |
| 253 | case "deleteAllForSelector": |
| 254 | return handleDeleteAllForSelector(parsed, op.selector); |
| 255 | default: |
| 256 | return undefined; |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | export function applyOp(parsed: ParsedDocument, op: EditOp): MutationResult { |
| 261 | const gsap = applyGsapOp(parsed, op); |
no test coverage detected