Ad Widget

Collapse

Patch: Solve the problem of "floated value" in map elements

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spaww
    Senior Member
    Zabbix Certified Specialist
    • May 2009
    • 178

    #1

    Patch: Solve the problem of "floated value" in map elements

    Hi all,

    Aleatory apear a BUG (related with some numbers in support.zabbix.com, like related in: ZBX-7174) and the browser change the user input adding a decimal value like:

    User set a width: 202 height: 201 (or some other value)
    Click on "Apply"
    Interface change to
    Width: 202.55555534362793
    Height: 201.55555534362793

    I solve the problem changing file js/class.cmap.js

    Lines 1058 and 1059 (Zabbix 2.2.3rc1)
    OLD:
    this.data.width = newWidth;
    this.data.height = newHeight;

    NEW:
    this.data.width = Math.floor(newWidth);
    this.data.height = Math.floor(newHeight);

    I test on Chrome and Firefox (Internet explorer no... someone can try ? ) and solve the problem for me !
    Adail Horst
    OCA/OCP - Oracle Application Server
    ZABBIX Certified Specialist
    http://www.spinola.net.br/blog (Blog sobre Zabbix e tecnologia)
Working...