Commit 14cb6b4e authored by Яков's avatar Яков
Browse files

Панель: убран автоматический второй разделитель

parent 1cc9ea41
...@@ -451,24 +451,17 @@ const ToolBar = ({ editor, toolsLib = [], toolsOptions, onInfo, labels = {} }) = ...@@ -451,24 +451,17 @@ const ToolBar = ({ editor, toolsLib = [], toolsOptions, onInfo, labels = {} }) =
} }
const isThickSep = (section) => // Второго вида разделителя больше нет.
section.type === 'g' && section.items.length === 1 && section.items[0] === '|' //
// Он рисовался автоматически между любыми двумя соседними секциями,
// и в пресете урока их набиралось тринадцать — 221 px волосяных линий
// внутри логически ОДНОЙ группы, из-за которых панель не влезала в ряд.
// Границу теперь ставит только явный «|», а секции внутри группы
// отбиваются зазором 2 px, как в макете.
const getItems = () => { const getItems = () => {
let toolItems = []; let toolItems = [];
toolbarItems.map((section, i) => { toolbarItems.map((section, i) => {
const prevSection = toolbarItems[i - 1]
const needThinSep = i > 0
&& !isThickSep(section)
&& prevSection && !isThickSep(prevSection)
if (needThinSep) {
toolItems.push(
<div key={`thin-sep-${i}`} className="atma-editor-toolbar-thin-sep" />
)
}
let gItems = []; let gItems = [];
if(section.type === 'g'){ if(section.type === 'g'){
section.items.map((gKey, idx)=>{ section.items.map((gKey, idx)=>{
......
...@@ -324,18 +324,6 @@ body{ ...@@ -324,18 +324,6 @@ body{
} }
} }
// Второго вида разделителя больше нет: два почти одинаковых
// волосяных штриха группировку не показывали, а мешали друг другу.
// Остался один — 1×20 с полями по 8.
&-thin-sep{
width: 1px;
height: 20px;
background-color: #E3E7EC;
margin: 0 8px;
flex-shrink: 0;
align-self: center;
}
&-info{ &-info{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -1741,10 +1729,6 @@ body{ ...@@ -1741,10 +1729,6 @@ body{
} }
} }
&-thin-sep{
display: none;
}
&-s{ &-s{
padding-right: 16px; padding-right: 16px;
......
Markdown is supported
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