MCPcopy
hub / github.com/methodofaction/Method-Draw / clickSwitch

Function clickSwitch

src/js/method-draw.js:795–810  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

793 };
794
795 var clickSwitch = function() {
796 var stroke_rect = document.querySelector('#tool_stroke rect');
797 $("#tool_stroke").toggleClass('active')
798 $("#tool_fill").toggleClass('active')
799 var fill_rect = document.querySelector('#tool_fill rect');
800 var fill_color = fill_rect.getAttribute("fill");
801 var stroke_color = stroke_rect.getAttribute("fill");
802 var stroke_opacity = parseFloat(stroke_rect.getAttribute("stroke-opacity"));
803 if (isNaN(stroke_opacity)) {stroke_opacity = 100;}
804 var fill_opacity = parseFloat(fill_rect.getAttribute("fill-opacity"));
805 if (isNaN(fill_opacity)) {fill_opacity = 100;}
806 var stroke = getPaint(stroke_color, stroke_opacity, "stroke");
807 var fill = getPaint(fill_color, fill_opacity, "fill");
808 Editor.paintBox.fill.setPaint(stroke, true);
809 Editor.paintBox.stroke.setPaint(fill, true);
810 };
811
812 var zoomImage = function(multiplier) {
813 var res = svgCanvas.getResolution();

Callers

nothing calls this directly

Calls 2

$Function · 0.85
getPaintFunction · 0.70

Tested by

no test coverage detected