-
-
Notifications
You must be signed in to change notification settings - Fork 339
Expand file tree
/
Copy pathremoveIframe.ts
More file actions
37 lines (34 loc) · 1004 Bytes
/
removeIframe.ts
File metadata and controls
37 lines (34 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { ISentence } from '@/Core/controller/scene/sceneInterface';
import { IPerform } from '@/Core/Modules/perform/performInterface';
import { stageActions } from '@/store/stageReducer';
import { webgalStore } from '@/store/store';
import { getBooleanArgByKey } from '../util/getSentenceArg';
/**
* 移除框架
* @param sentence
*/
export const removeIframe = (sentence: ISentence): IPerform => {
const id = sentence.content;
const save = getBooleanArgByKey(sentence, 'save') ?? false;
if (!id) {
return {
performName: 'none',
duration: 0,
isHoldOn: false,
stopFunction: () => {},
blockingNext: () => false,
blockingAuto: () => true,
stopTimeout: undefined,
};
}
webgalStore.dispatch(stageActions.removeIframe({ id, isActive: save }));
return {
performName: 'none',
duration: 0,
isHoldOn: false,
stopFunction: () => {},
blockingNext: () => false,
blockingAuto: () => true,
stopTimeout: undefined,
};
};