add calculating of relative w&h in publish.js