Skip to content

Commit

Permalink
Merge pull request #1817 from vektor-inc/fix/outer/divider_setting_of…
Browse files Browse the repository at this point in the history
…_each_device

[ Outer ] 区切り線で端末毎の設定値から入力した場合の不具合を修正
  • Loading branch information
mthaichi authored Oct 12, 2023
2 parents dfc8a44 + 217785a commit ef754c4
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 @@ -69,6 +69,8 @@ e.g.
[ Bug fix ][ Table of Contents ] Fixed the issue with inner blocks not working correctly.
[ Add Function ][ Blog Card (Pro) ] Add block variation function.

[ 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 ef754c4

Please sign in to comment.