Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Fix bugs (& minor refactor) #104

Merged
merged 4 commits into from Aug 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/frontend/stores/EditorStateStore.ts
Expand Up @@ -75,7 +75,8 @@ class EditorStateStore extends ReduceStore<StateRecord, KnownPayload>
.set('activeClip', null)

case ProjectModDispatchTypes.RemoveClip: {
if (state.get('activeClip').id === payload.entity.targetClipId) {
const activeClip = state.get('activeClip')
if (activeClip && activeClip.id === payload.entity.targetClipId) {
return state.set('activeClip', null)
}

Expand Down
1 change: 1 addition & 0 deletions src/frontend/stores/ProjectStore.ts
Expand Up @@ -94,6 +94,7 @@ class ProjectStore extends ReduceStore<StateRecord, KnownPayload>
case ProjectModDispatchTypes.AddKeyframe: {
const {targetClip, propName, keyframe} = payload.entity
ProjectHelper.addKeyframe(project!, targetClip, propName, keyframe)
break
}

case ProjectModDispatchTypes.MoveClipToLayer: {
Expand Down
10 changes: 2 additions & 8 deletions src/frontend/utils/Flux/Payload.ts
@@ -1,9 +1,3 @@
export default class Payload<T, P> {
type: T
entity: P

constructor(type: T, entity: P) {
this.type = type
this.entity = entity
}
}
constructor(public type: T, public entity: P) {}
}
16 changes: 2 additions & 14 deletions src/frontend/views/TimelineView/_ClipSpace.tsx
Expand Up @@ -46,20 +46,8 @@ export default class ClipSpace extends React.Component<TimelaneClipSpaceProps, T
activeClip: PropTypes.object,
}

private _plugins: {id: string, packageName: string}[]

constructor()
{
super()

this._plugins = RendererService.pluginRegistry.getPlugins().map(entry => ({
id: entry.id,
packageName: entry.package.name
}))

this.state = {
dragovered: false,
}
public state = {
dragovered: false,
}

private _onDrop = (e: React.DragEvent<HTMLLIElement>) =>
Expand Down