Skip to content

Commit 87f51ae

Browse files
committed
[bug] fix link hover control not working the first time clicked
1 parent b845255 commit 87f51ae

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎src/css/link.css‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
margin-right:0.5em;
7777
}
7878

79-
.is-link-item-hoverscale .link-item.link-empty:hover{
79+
.is-link-item-hoverscale-show .link-item.link-empty:hover{
8080
transform:scale(1);
8181
}
8282

@@ -102,13 +102,13 @@
102102
outline:0;
103103
}
104104

105-
.is-link-item-hoverscale .link-item:focus-within,
106-
.is-link-item-hoverscale .link-item:focus,
107-
.is-link-item-hoverscale .link-item:hover{
105+
.is-link-item-hoverscale-show .link-item:focus-within,
106+
.is-link-item-hoverscale-show .link-item:focus,
107+
.is-link-item-hoverscale-show .link-item:hover{
108108
transform:scale(1.05);
109109
}
110110

111-
.is-link-item-hoverscale .link-item:active{
111+
.is-link-item-hoverscale-show .link-item:active{
112112
transform:scale(1.04);
113113
transition: none;
114114
}

‎src/js/control.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,7 @@ var control = (function(){
21052105
}
21062106
},{
21072107
element: helper.e(".control-link-item-hoverscale"),
2108-
path: "link.item.hoverScale",
2108+
path: "link.item.hoverScale.show",
21092109
type: "checkbox",
21102110
func: function(){
21112111
render.class();
@@ -2717,7 +2717,7 @@ var control = (function(){
27172717
helper.removeClass(html,"is-link-item-url-show");
27182718
helper.removeClass(html,"is-link-item-line-show");
27192719
helper.removeClass(html,"is-link-item-shadow-show");
2720-
helper.removeClass(html,"is-link-item-hoverscale");
2720+
helper.removeClass(html,"is-link-item-hoverscale-show");
27212721
helper.removeClass(html,"is-link-item-alignment-left");
27222722
helper.removeClass(html,"is-link-item-alignment-center");
27232723
helper.removeClass(html,"is-link-item-alignment-right");
@@ -2748,8 +2748,8 @@ var control = (function(){
27482748
if(state.get().link.item.shadow.show){
27492749
helper.addClass(html,"is-link-item-shadow-show");
27502750
};
2751-
if(state.get().link.item.hoverScale){
2752-
helper.addClass(html,"is-link-item-hoverscale");
2751+
if(state.get().link.item.hoverScale.show){
2752+
helper.addClass(html,"is-link-item-hoverscale-show");
27532753
};
27542754
if(state.get().link.item.border>0){
27552755
helper.addClass(html,"is-link-item-border");

0 commit comments

Comments
(0)