Marquee API

  • Last update:  2022-02-10
  • 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: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy