Skip to content

Commit

Permalink
Update utils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Apr 9, 2024
1 parent 1830690 commit 02b6ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desktop/common/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var jeedomUtils = {
}
jeedomUtils.tileWidthStep = (parseInt(jeedom.theme['widget::step::width']) > 1 ? parseInt(jeedom.theme['widget::step::width']) : 1) + parseInt(jeedom.theme['widget::margin']) // with margin
jeedomUtils.tileHeightStep = (parseInt(jeedom.theme['widget::step::height']) > 1 ? parseInt(jeedom.theme['widget::step::height']) : 1) + parseInt(jeedom.theme['widget::margin']) // with margin
jeedomUtils.tileHeightSteps = Array.apply(null, { length: 50 }).map(function(value, index) { return (index + 1) * jeedomUtils.tileHeightStep })
jeedomUtils.tileHeightSteps = Array.apply(null, { length: 500 }).map(function(value, index) { return (index + 1) * jeedomUtils.tileHeightStep })


/*Hijack jQuery ready function, still used in plugins
Expand Down Expand Up @@ -1478,7 +1478,7 @@ jeedomUtils.positionEqLogic = function(_id, _preResize, _scenario) {
var cols = Math.floor(containerWidth / jeedomUtils.tileWidthStep)
var tileWidthAdd = containerWidth - (cols * jeedomUtils.tileWidthStep)
var widthStep = jeedomUtils.tileWidthStep + (tileWidthAdd / cols)
var widthSteps = Array.apply(null, { length: 50 }).map(function(value, index) { return (index + 1) * widthStep })
var widthSteps = Array.apply(null, { length: 500 }).map(function(value, index) { return (index + 1) * widthStep })

if (_id != undefined) {
var tile = (_scenario) ? document.querySelector('.scenario-widget[data-scenario_id="' + _id + '"]') : document.querySelector('.eqLogic-widget[data-eqlogic_id="' + _id + '"]')
Expand Down

0 comments on commit 02b6ecc

Please sign in to comment.