Skip to content
Snippets Groups Projects
Commit 7e55de78 authored by chris's avatar chris
Browse files

remove activeViewId

parent 46681afb
No related branches found
No related tags found
1 merge request!172Block level active
Showing
with 14 additions and 14 deletions
...@@ -19,7 +19,7 @@ const Button = ({ view = {}, item }) => { ...@@ -19,7 +19,7 @@ const Button = ({ view = {}, item }) => {
run(state, dispatch); run(state, dispatch);
}; };
const isActive = active && active(state, activeViewId); const isActive = active && active(state);
const isDisabled = const isDisabled =
enable && !enable(state) && !(select && select(state, activeViewId)); enable && !enable(state) && !(select && select(state, activeViewId));
......
...@@ -17,7 +17,7 @@ class Author extends Tools { ...@@ -17,7 +17,7 @@ class Author extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.author)(state); return Commands.blockActive(state.config.schema.nodes.author)(state);
}; };
} }
......
...@@ -17,7 +17,7 @@ class EpigraphPoetry extends Tools { ...@@ -17,7 +17,7 @@ class EpigraphPoetry extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.epigraphPoetry)( return Commands.blockActive(state.config.schema.nodes.epigraphPoetry)(
state, state,
); );
......
...@@ -18,7 +18,7 @@ class EpigraphProse extends Tools { ...@@ -18,7 +18,7 @@ class EpigraphProse extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.epigraphProse)( return Commands.blockActive(state.config.schema.nodes.epigraphProse)(
state, state,
); );
......
...@@ -19,7 +19,7 @@ class Heading1 extends Tools { ...@@ -19,7 +19,7 @@ class Heading1 extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.heading, { return Commands.blockActive(state.config.schema.nodes.heading, {
level: 1, level: 1,
})(state); })(state);
......
...@@ -19,7 +19,7 @@ class Heading2 extends Tools { ...@@ -19,7 +19,7 @@ class Heading2 extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.heading, { return Commands.blockActive(state.config.schema.nodes.heading, {
level: 2, level: 2,
})(state); })(state);
......
...@@ -19,7 +19,7 @@ class Heading3 extends Tools { ...@@ -19,7 +19,7 @@ class Heading3 extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.heading, { return Commands.blockActive(state.config.schema.nodes.heading, {
level: 3, level: 3,
})(state); })(state);
......
...@@ -18,7 +18,7 @@ class SubTitle extends Tools { ...@@ -18,7 +18,7 @@ class SubTitle extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.subtitle)(state); return Commands.blockActive(state.config.schema.nodes.subtitle)(state);
}; };
} }
......
...@@ -18,7 +18,7 @@ class Title extends Tools { ...@@ -18,7 +18,7 @@ class Title extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.title)(state); return Commands.blockActive(state.config.schema.nodes.title)(state);
}; };
} }
......
...@@ -22,7 +22,7 @@ class ExtractPoetry extends Tools { ...@@ -22,7 +22,7 @@ class ExtractPoetry extends Tools {
}; };
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.extractPoetry)( return Commands.blockActive(state.config.schema.nodes.extractPoetry)(
state, state,
); );
......
...@@ -17,7 +17,7 @@ class ExtractProse extends Tools { ...@@ -17,7 +17,7 @@ class ExtractProse extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.extractProse)( return Commands.blockActive(state.config.schema.nodes.extractProse)(
state, state,
); );
......
...@@ -17,7 +17,7 @@ class ParagraphContinued extends Tools { ...@@ -17,7 +17,7 @@ class ParagraphContinued extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.paragraphCont)( return Commands.blockActive(state.config.schema.nodes.paragraphCont)(
state, state,
); );
......
...@@ -18,7 +18,7 @@ class Paragraph extends Tools { ...@@ -18,7 +18,7 @@ class Paragraph extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.paragraph)(state); return Commands.blockActive(state.config.schema.nodes.paragraph)(state);
}; };
} }
......
...@@ -17,7 +17,7 @@ class SourceNote extends Tools { ...@@ -17,7 +17,7 @@ class SourceNote extends Tools {
} }
get active() { get active() {
return (state, activeViewId) => { return state => {
return Commands.blockActive(state.config.schema.nodes.sourceNote)(state); return Commands.blockActive(state.config.schema.nodes.sourceNote)(state);
}; };
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment