App.SvgHelper = Ember.Helper.helper (params, options)->
  content = params[0]
  width = options.width
  height = options.height
  angle = options.rotation || 0
  box_size = Math.sqrt((width * width) + (height * height))
  svg_head = "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 #{box_size} #{box_size}\">"
  group_head = "<g transform=\"translate(#{(box_size - width)/2}, #{(box_size - height)/2}) rotate(#{angle} #{width/2} #{height/2})\">"
  "#{svg_head}#{group_head}#{content}</g></svg>".htmlSafe()
