fix slider all

compose formula from native javascript to calculate size of layer