move relating code to svg package
fix issue of cannot popup menu on background of SVG by add background
rectangle.