The method checks if the values are a number. It then sets a csss and calls's rapael's setSize which sets height/width attributes. All of these accept non numeric values like '100%', '100px', etc. It would be nice if setDimension supports these. This just means not doing the checks.