Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. <svg id="pnlShapes" width="640" height="480">
  2. <svg id="shapes" width="640" height="480">
  3. <g id="shapes-group" width="640" height="480">
  4. <polygon id="svgSection_Floor" points="222.61,199.75,222.61,295.19,380.62,295.19,380.62,199.75,222.61,199.75,368.46,283.92,233.54,283.92,233.54,209.12,368.46,209.12,368.46,283.92" title="Floor" link="Primary" style="color: rgb(211, 211, 211); font-size: 0px; left: 0px; top: 0px; opacity: 0.82; fill: rgb(211, 211, 211); cursor: not-allowed;"></polygon>
  5. <text x="302.61" y="289.4705" fill="white" font-size="9" font-weight="bold" text-anchor="middle">Floor</text>
  6. <!-- plus a bunch more polygon and text element... -->
  7. </g>
  8. </svg>
  9. </svg>
  10.  
  11. <svg id="pnlShapes" width="640" height="480">
  12. <defs xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg">
  13. <pattern id="image" x="0" y="0" patternunits="userSpaceOnUse" height="480" width="640">
  14. <image x="0" y="0" width="640" height="480" xlink:href="http://localhost:44000/Content/images/theImage.jpg"></image>
  15. </pattern>
  16. </defs>
  17. <svg id="shapes" width="640" height="480" fill="url(#image)">
  18. <g id="shapes-group" width="640" height="480">
  19. <polygon id="svgSection_Floor" points="222.61,199.75,222.61,295.19,380.62,295.19,380.62,199.75,222.61,199.75,368.46,283.92,233.54,283.92,233.54,209.12,368.46,209.12,368.46,283.92" title="Floor" link="Primary" style="color: rgb(211, 211, 211); font-size: 0px; left: 0px; top: 0px; opacity: 0.82; fill: rgb(211, 211, 211); cursor: not-allowed;"></polygon>
  20. <text x="302.61" y="289.4705" fill="white" font-size="9" font-weight="bold" text-anchor="middle">Floor</text>
  21. </g>
  22. </svg>
  23. </svg>
  24.  
  25. $('#shapes').svg();
  26. var foo = $('#shapes').svg('get');
  27. foo.filters.image(null, '', "http://localhost:44000/Content/images/theImage.jpg");
  28.  
  29. var $section = $('#svg-container').first();
  30. $section.find('g').panzoom({
  31. $zoomIn: $section.find(".zoom-in"),
  32. $zoomOut: $section.find(".zoom-out"),
  33. $zoomRange: $section.find(".zoom-range"),
  34. $reset: $section.find(".reset")
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement