Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

Marquee Interface

startMarquee

Note 1: The marquee effect implemented with the following interfaces does not support refreshing through the "Report Block Refresh Plugin in Dashboard".

MethodstartMarquee(opt)Turn on the marquee effect
  Parameteropt: {
offset: number,
interval: number,

stopOnHover: boolean,

to: string

}

Scrolling effect attributes, json format

offset: the distance of each scroll, the default is 5px, the unit is px

interval: interval duration, the default is 0.1s, the unit is s

stopOnHover: Whether to pause when the mouse is hovered, the default is true

  • true: Pause

  • false: do not pause

to: the direction of scrolling, supports up and left, the default is up

  • 'top': scroll up

  • 'left': scroll left

Return valuevoid
    Example

Example 1: If the obtained report block object is defined as report, implement the default marquee effect (5px scroll every 0.1s, pause when the mouse is hovered)

report.startMarquee();

Example 2: Implementing the default marquee effect in a general report

_g().startMarquee();

Example 3: Add a default marquee effect to the report0 report block in the dashboard

_g().getWidgetByName('report0').startMarquee();

Note: When the code is added in the "after initialization" event, it is recommended to add a delay function, otherwise an error may occur because the report block object is not fully created. An example is as follows:

setTimeout(function(){
     _g().getWidgetByName('report0').startMarquee();
}, 500);

Example 4: Scroll 2 px to the left every 0.3s in a general report, without pausing when the mouse is hovered

report.startMarquee({        
offset: 2,        
interval: 0.3,        
stopOnHover: false,
to:'left'   
});

Example 5: The report0 report block in the dashboard scrolls 2 px to the left every 0.3s, and does not pause when the mouse is hovered

setTimeout(function({
_g().getWidgetByName('report0').startMarquee({
offset: 2,
interval: 0.3,
stopOnHover: false,
to:'left'
});
}, 500);

Application

example

The report block implements the default marquee effect, and stops scrolling when the mouse hovers:

Click to download the template: 

Turn on the marquee.frm

1.gif

MobileNot support mobile terminal

stopMarquee

MethodstopMarquee()Turn off the marquee effect
  Parameter-

-

Return valuevoid
   Example

Example 1: If the obtained report block object is defined as report, turn off the marquee effect set by startMarquee()

report.stopMarquee();

Example 2: Turn off the marquee effect set by startMarquee() in a general report

_g().stopMarquee();

Example 3: Turn off the marquee effect of the report0 report block in the dashboard

_g().getWidgetByName('report0').stopMarquee();

Application

example

The report block realizes the marquee effect, click the "Turn off" button to turn off the marquee effect:

Click to download the template: 

Turn off the marquee.frm

2.gif

MobileNot support mobile terminal



Attachment List


Theme: 11.0 New Features
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback