Skip to content

Commit

Permalink
fix : divider setting
Browse files Browse the repository at this point in the history
  • Loading branch information
osmdik committed Sep 28, 2023
1 parent 45a1ffc commit 217785a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ e.g.

== Changelog ==

[ Bug fix ][ Outer (Pro) ] Fixed a bug in the initial setting of divider for each device.

= 1.62.0 =
[ Add Block ][ Blog Card (Pro) ] Add blog card block.
[ Add Block ][ New Badge Block (Pro) ] Add a block to display recent posts.
Expand Down
35 changes: 15 additions & 20 deletions src/blocks/_pro/outer/component-divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ const componentDivider = (
if (level > 0) {
return (
<path
d={`m0,${
100 - level / 2
} q20,${level},40,0 t40,0 t40,0 V100 L0,100 z`}
d={`m0,${100 - level / 2
} q20,${level},40,0 t40,0 t40,0 V100 L0,100 z`}
strokeWidth="0"
fill={isHexColor(color) ? color : 'currentColor'}
className={pathClassNames}
Expand All @@ -92,9 +91,8 @@ const componentDivider = (
} else if (level < 0) {
return (
<path
d={`m0,${
level / 2 + 100
} q20,${level},40,0 t40,0 t40,0 V100 L0,100 z`}
d={`m0,${level / 2 + 100
} q20,${level},40,0 t40,0 t40,0 V100 L0,100 z`}
strokeWidth="0"
fill={isHexColor(color) ? color : 'currentColor'}
className={pathClassNames}
Expand All @@ -111,9 +109,8 @@ const componentDivider = (
if (level > 0) {
return (
<path
d={`m0,100 h${
50 - DivideAbs4
} l${DivideAbs4},-${absLevel} l${DivideAbs4},${absLevel} h${DivideAbs4} v100 h-100 z`}
d={`m0,100 h${50 - DivideAbs4
} l${DivideAbs4},-${absLevel} l${DivideAbs4},${absLevel} h${DivideAbs4} v100 h-100 z`}
strokeWidth="0"
fill={isHexColor(color) ? color : 'currentColor'}
className={pathClassNames}
Expand All @@ -122,11 +119,9 @@ const componentDivider = (
} else if (level < 0) {
return (
<path
d={`m0,${100 - absLevel} h${
50 - DivideAbs4
} l${DivideAbs4},${absLevel} l${DivideAbs4},-${absLevel} h${
50 - DivideAbs4
} v${absLevel + 1} h-100 z`}
d={`m0,${100 - absLevel} h${50 - DivideAbs4
} l${DivideAbs4},${absLevel} l${DivideAbs4},-${absLevel} h${50 - DivideAbs4
} v${absLevel + 1} h-100 z`}
strokeWidth="0"
fill={isHexColor(color) ? color : 'currentColor'}
className={pathClassNames}
Expand Down Expand Up @@ -199,9 +194,9 @@ const componentDivider = (
if (levelSettingPerDevice) {
return (
<>
{level_pc && renderSVG(level_pc, 'upper', 'pc')}
{level_tablet && renderSVG(level_tablet, 'upper', 'tablet')}
{level_mobile && renderSVG(level_mobile, 'upper', 'mobile')}
{level_pc !== 0 && level_pc && renderSVG(level_pc, 'upper', 'pc')}
{level_tablet !== 0 && level_tablet && renderSVG(level_tablet, 'upper', 'tablet')}
{level_mobile !== 0 && level_mobile && renderSVG(level_mobile, 'upper', 'mobile')}
</>
);
}
Expand All @@ -210,9 +205,9 @@ const componentDivider = (
if (levelSettingPerDevice) {
return (
<>
{level_pc && renderSVG(level_pc, 'lower', 'pc')}
{level_tablet && renderSVG(level_tablet, 'lower', 'tablet')}
{level_mobile && renderSVG(level_mobile, 'lower', 'mobile')}
{level_pc !== 0 && level_pc && renderSVG(level_pc, 'lower', 'pc')}
{level_tablet !== 0 && level_tablet && renderSVG(level_tablet, 'lower', 'tablet')}
{level_mobile !== 0 && level_mobile && renderSVG(level_mobile, 'lower', 'mobile')}
</>
);
}
Expand Down

0 comments on commit 217785a

Please sign in to comment.