take padding into account for label calculations in map.js