@@ -3211,16 +3211,17 @@ def create_driverjs_tour(self, name=None):
3211
3211
"""
3212
3212
// DriverJS Tour
3213
3213
var tour = new Driver({
3214
- animate: false , // Animate while changing highlighted element
3215
- opacity: 0.15 , // Background opacity (0: no popover / overlay)
3214
+ opacity: 0.24 , // Background opacity (0: no popover / overlay)
3215
+ padding: 6 , // Distance of element from around the edges
3216
3216
allowClose: false, // Whether clicking on overlay should close
3217
3217
overlayClickNext: false, // Move to next step on overlay click
3218
- doneBtnText: 'Done', // Text on the final button
3219
- closeBtnText: 'Close', // Text on the close button
3220
- nextBtnText: 'Next', // Next button text for this step
3221
- prevBtnText: 'Previous', // Previous button text for this step
3222
- showButtons: true, // Do not show control buttons in footer
3218
+ doneBtnText: 'Done', // Text that appears on the Done button
3219
+ closeBtnText: 'Close', // Text appearing on the Close button
3220
+ nextBtnText: 'Next', // Text that appears on the Next button
3221
+ prevBtnText: 'Previous', // Text appearing on Previous button
3222
+ showButtons: true, // This shows control buttons in the footer
3223
3223
keyboardControl: true, // (escape to close, arrow keys to move)
3224
+ animate: true, // Animate while changing highlighted element
3224
3225
});
3225
3226
tour.defineSteps([
3226
3227
""" )
@@ -3441,8 +3442,6 @@ def __add_driverjs_tour_step(self, message, selector=None, name=None,
3441
3442
alignment - Choose from "top", "bottom", "left", and "right".
3442
3443
("top" is the default alignment).
3443
3444
"""
3444
- if not selector :
3445
- selector = "html"
3446
3445
message = (
3447
3446
'<font size=\" 3\" color=\" #33477B\" ><b>' + message + '</b></font>' )
3448
3447
title_row = ""
@@ -3452,21 +3451,24 @@ def __add_driverjs_tour_step(self, message, selector=None, name=None,
3452
3451
else :
3453
3452
title_row = "title: '%s'," % title
3454
3453
align_row = "position: '%s'," % alignment
3455
- if selector == "html" :
3454
+ ani_row = "animate: true,"
3455
+ if not selector or selector == "html" or selector == "body" :
3456
3456
selector = "body"
3457
- align_row = "position: '%s'," % "bottom"
3457
+ ani_row = "animate: false,"
3458
+ align_row = "position: '%s'," % "mid-center"
3458
3459
element_row = "element: '%s'," % selector
3459
- description_row = "description: '%s'," % message
3460
+ desc_row = "description: '%s'," % message
3460
3461
3461
3462
step = ("""{
3463
+ %s
3462
3464
%s
3463
3465
popover: {
3464
3466
className: 'popover-class',
3465
3467
%s
3466
3468
%s
3467
3469
%s
3468
3470
}
3469
- },""" % (element_row , title_row , description_row , align_row ))
3471
+ },""" % (element_row , ani_row , title_row , desc_row , align_row ))
3470
3472
3471
3473
self ._tour_steps [name ].append (step )
3472
3474
0 commit comments