@@ -681,6 +681,8 @@ CanvasRenderingContext2D.prototype.roundRect = function(x, y, w, h, r) {
681
681
} ;
682
682
} ;
683
683
684
+ var arrowFinishX ;
685
+
684
686
that . renderArrow = function ( data ) {
685
687
var x_from = data . x_from || 0 ;
686
688
var y_from = data . y_from || 0 ;
@@ -713,9 +715,11 @@ CanvasRenderingContext2D.prototype.roundRect = function(x, y, w, h, r) {
713
715
var text = data . text || "" ;
714
716
that . enjoyhint . addClass ( that . cl . svg_transparent ) ;
715
717
718
+ arrowFinishX = x_to ;
719
+
716
720
setTimeout ( function ( ) {
717
721
$ ( "#enjoyhint_arrpw_line" ) . remove ( ) ;
718
-
722
+
719
723
var d =
720
724
"M" +
721
725
x_from +
@@ -952,21 +956,30 @@ CanvasRenderingContext2D.prototype.roundRect = function(x, y, w, h, r) {
952
956
text : data . text
953
957
} ) ;
954
958
955
- that . $next_btn . css ( {
956
- left : label_x ,
957
- top : label_y + label_height + 20
958
- } ) ;
959
+ setTimeout ( function ( ) {
960
+ var summoryButtonWidth = that . $next_btn . width ( ) + that . $skip_btn . width ( ) + 10 ;
961
+ var distance = label_x ;
959
962
960
- var left_skip = label_x + that . $next_btn . width ( ) + 10 ;
963
+ if ( summoryButtonWidth + label_x > arrowFinishX ) {
964
+ distance = label_x + label_width / 2 + 20 ;
965
+ }
961
966
962
- if ( that . nextBtn == "hide" ) {
963
- left_skip = label_x ;
964
- }
967
+ that . $next_btn . css ( {
968
+ left : distance ,
969
+ top : label_y + label_height + 20
970
+ } ) ;
965
971
966
- that . $skip_btn . css ( {
967
- left : left_skip ,
968
- top : label_y + label_height + 20
969
- } ) ;
972
+ var left_skip = distance + that . $next_btn . width ( ) + 10 ;
973
+
974
+ if ( that . nextBtn == "hide" ) {
975
+ left_skip = distance ;
976
+ }
977
+
978
+ that . $skip_btn . css ( {
979
+ left : left_skip ,
980
+ top : label_y + label_height + 20
981
+ } ) ;
982
+ } , 0 )
970
983
971
984
that . $close_btn . css ( {
972
985
right : 10 ,
0 commit comments