{"id":310355,"date":"2020-09-23T09:00:21","date_gmt":"2020-09-23T09:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310355"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310355","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 Htmlix"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/520300\/\">\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 javascript \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 <a href=\"https:\/\/sergeyovechkin.github.io\/simple-cms\/\" rel=\"nofollow\"> htmlix.<\/a><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043d\u043e\u043f\u043e\u043a, \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u0442.\u0434. \u0418 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e htmlix \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u043b\u0438\u043a\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u2014 <a href=\"https:\/\/github.com\/SergeyOvechkin\/collage_n\" rel=\"nofollow\">\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0430\u0436\u0435\u0439 \u0438 \u0441\u043f\u0440\u0430\u0439\u0442\u043e\u0432 Collage_n <\/a>.<\/p>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438 \u0432 htmlix \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (core) \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c js \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u043c. <a href=\"https:\/\/sergeyovechkin.github.io\/simple-cms\/post\/additional_topics\/41399\" rel=\"nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438, <\/a> \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043d\u043e\u0432\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/github.com\/SergeyOvechkin\/collage_n\/blob\/master\/js\/modules\/addDrawCirclePanel.js\" rel=\"nofollow\">addDrawCirclePane <\/a> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Collage_n \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0438\u0441\u0443\u0435\u0442 \u043a\u0440\u0443\u0433\u0438 \u043d\u0430 \u043a\u0430\u043d\u0432\u0430\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u044b\u0448\u0438. \u041f\u0435\u0440\u0435\u0434 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u2014 \u0446\u0432\u0435\u0442 \u0438 \u0434\u0438\u0430\u043c\u0435\u0442\u0440 \u043a\u0440\u0443\u0433\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441 \u0442\u0438\u043f\u043e\u043c inputvalue. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 emiter \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u00abemiter-operation-with\u00bb \u2014 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u00abdraw-circle\u00bb \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f, \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: <\/p>\n<pre><code class=\"javascript\">(function(){  \/\/\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f data-draw_circle_panel=&quot;container&quot; \/\/\u0432\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 js \u043f\u043e\u043b\u044f \u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u0430\u043c\u0438 (\u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430) \/\/ name=&quot;draw_circle_btn&quot;, name=&quot;draw_sircle_radius&quot;, name=&quot;draw_sircle_color&quot;\t   var html = `    &lt;div data-draw_circle_panel=&quot;container&quot;  class=&quot;form-group&quot; name=&quot;draw_circle_panel&quot;&gt; \t&lt;label for=&quot;exampleFormControlInput1&quot; style=&quot;font-size: 15px;&quot;&gt;                        \u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c         &lt;\/label&gt; \t&lt;div class=&quot;form-row&quot;&gt; \t\t&lt;div class=&quot;form-group col-md-4&quot;&gt;\t\t\t\t\t\t\t\t                      &lt;button type=&quot;button&quot; name=&quot;draw_circle_btn&quot; class=&quot;btn btn-success btn-sm&quot;&gt;                             \u0420\u0438\u0441\u043e\u0432\u0430\u0442\u044c                       &lt;\/button&gt; \t\t&lt;\/div&gt; \t\t&lt;div class=&quot;form-group col-md-4&quot;&gt;\t\t\t\t\t\t\t\t\t\t \t\t   &lt;input name=&quot;draw_sircle_radius&quot; type=&quot;text&quot; class=&quot;form-control form-control-sm&quot;&gt; \t\t&lt;\/div&gt; \t\t&lt;div class=&quot;form-group col-md-4&quot;&gt;\t\t\t\t\t\t\t\t\t\t \t\t     &lt;input name=&quot;draw_sircle_color&quot; type=&quot;text&quot; class=&quot;form-control form-control-sm&quot;&gt; \t\t&lt;\/div&gt; \t&lt;\/div&gt;\t\t\t\t\t\t\t\t  &lt;\/div&gt; `  ;    \/\/\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u043e\u0431\u0449\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.   var div = document.createElement(&quot;div&quot;);   div.innerHTML = html;   div = div.querySelector(&quot;div&quot;);   var parent = document.querySelector(&quot;[data-main_form]&quot;);   var insert_before = document.querySelector(&quot;[name='common_btns_class']&quot;)   var insertedElement = parent.insertBefore(div, insert_before);       \/\/js \u043a\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f   var draw_circle_panel = { \t   \t  container: &quot;draw_circle_panel&quot;, \/\/\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043c\u043e\u0434\u0443\u043b\u044f \t  props: [                \/\/\/\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \t\t[&quot;draw_circle_btn&quot;, &quot;click&quot;, &quot;[name='draw_circle_btn']&quot;],  \t\t[&quot;draw_sircle_radius&quot;, &quot;inputvalue&quot;, &quot;[name='draw_sircle_radius']&quot;], \t\t[&quot;draw_sircle_color&quot;, &quot;inputvalue&quot;, &quot;[name='draw_sircle_color']&quot;],   \/\/\/\u0434\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430-\u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e core \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: \u043a\u043b\u0438\u043a\u0438 \u043f\u043e \u043a\u0430\u043d\u0432\u0430\u0441 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0441\u043c\u0435\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \t\t[&quot;canvas_click&quot;, &quot;emiter-mousedown-canvas&quot;, &quot;&quot;], \t\t \t\t[&quot;operation_with&quot;, &quot;emiter-operation-with&quot;, &quot;&quot;], \t  ], \t  methods: {  \/\/\u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439 canvas \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ( mousedown) \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438\t \t\t  operation_with: function(){   \t\t\t  if(this.emiter.prop != &quot;draw-circle&quot;){\t\t\t  \t\t\t\t  \t\t\t\t  this.parent.props.canvas_click.disableEvent();\t\t\t   \t\t\t  }else{\t\t\t\t  \t\t\t\t \t\t\t\t  this.parent.props.canvas_click.enableEvent();\t\t\t   \t\t\t  }\t\t\t   \t\t  },  \/\/\u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c - \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 &quot;emiter-operation-with&quot; \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e prop = &quot;draw-circle&quot; \u0447\u0442\u043e\u0431\u044b \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u0441\u043a\u0440\u044b\u043b\u0438 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438.  \t\t  draw_circle_btn: function(){  \t\t\t\t  this.$$(&quot;emiter-operation-with&quot;).set(&quot;draw-circle&quot;); \t\t\t \t\t  \t\t   \t\t  }\t,  \/\/\u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f  &quot;emiter-mousedown-canvas&quot; \u0438 \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0440\u0438\u0441\u0443\u0435\u0442 \u043a\u0440\u0443\u0433\u0438 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0430\u0445 \u043c\u044b\u0448\u044c\u044e.  \t\t canvas_click: function(){ \t\t\tif(this.$$(&quot;emiter-operation-with&quot;).prop == &quot;draw-circle&quot;){ \/\/\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0434\u0443\u043b\u044f \t\t\t  var props = this.parent.props; \t\t\t  var radius = props.draw_sircle_radius.getProp(); \t\t\t  var color = props.draw_sircle_color.getProp();                       \t\t\t  var point = this.emiter.prop;\/\/\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e (core) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043a\u0430\u043d\u0432\u0430\u0441\t               saveStep(saveImg, this.$props().commonProps.area_1);  \/\/\u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432, \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \t\t\t  \t\t\t\tctx.save(); \t            ctx.putImageData(saveImg, 0, 0); \t\t\t\tctx.beginPath(); \t\t\t\tctx.arc(point[0], point[1], radius, 0, 2*Math.PI, false); \t\t\t\tctx.fillStyle =  color; \t\t\t\tctx.fill(); \t\t\t\tctx.lineWidth = 1; \t\t\t\tctx.strokeStyle =  color; \t\t\t\tctx.stroke();                                 \/\/\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \t\t\t\t \t\t\t\tsaveImg = ctx.getImageData(0,0, srcWidth, srcHeight); \t\t\t\tctx.restore();\t\t\t\t \t\t\t} \t\t}\t   \t  }\t     }  \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u043e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f   HM.description.draw_circle_panel  = draw_circle_panel;  \/\/\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043c\u043e\u0434\u0443\u043b\u044f   HM.containerInit(div , HM.description, &quot;draw_circle_panel&quot;);    HM.eventProps[&quot;emiter-operation-with&quot;].emit(); \/\/\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439 canvas \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044f  })()  <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438: HM.containerInit(htmlLink, HM.description, \u00abmodule_name\u00bb);<br \/>  \u0433\u0434\u0435 HM \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e HM.arrayInit(htmlLink, HM.description, \u00abmodule_name\u00bb);<\/p>\n<p>  \u0412 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Collage_n \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u00ab\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb. <\/p>\n<p>  \u042d\u0442\u043e \u0431\u044b\u043b \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f htmlix \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/520300\/\"> https:\/\/habr.com\/ru\/post\/520300\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/520300\/\">\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 javascript \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 <a href=\"https:\/\/sergeyovechkin.github.io\/simple-cms\/\" rel=\"nofollow\"> htmlix.<\/a><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043d\u043e\u043f\u043e\u043a, \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u0442.\u0434. \u0418 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e htmlix \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u043b\u0438\u043a\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u2014 <a href=\"https:\/\/github.com\/SergeyOvechkin\/collage_n\" rel=\"nofollow\">\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0430\u0436\u0435\u0439 \u0438 \u0441\u043f\u0440\u0430\u0439\u0442\u043e\u0432 Collage_n <\/a>.<\/p>\n<p>  \u041c\u043e\u0434\u0443\u043b\u0438 \u0432 htmlix \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (core) \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c js \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441\u043c. <a href=\"https:\/\/sergeyovechkin.github.io\/simple-cms\/post\/additional_topics\/41399\" rel=\"nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438, <\/a> \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043d\u043e\u0432\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/github.com\/SergeyOvechkin\/collage_n\/blob\/master\/js\/modules\/addDrawCirclePanel.js\" rel=\"nofollow\">addDrawCirclePane <\/a> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Collage_n \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0438\u0441\u0443\u0435\u0442 \u043a\u0440\u0443\u0433\u0438 \u043d\u0430 \u043a\u0430\u043d\u0432\u0430\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u044b\u0448\u0438. \u041f\u0435\u0440\u0435\u0434 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u2014 \u0446\u0432\u0435\u0442 \u0438 \u0434\u0438\u0430\u043c\u0435\u0442\u0440 \u043a\u0440\u0443\u0433\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441 \u0442\u0438\u043f\u043e\u043c inputvalue. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 emiter \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u00abemiter-operation-with\u00bb \u2014 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u00abdraw-circle\u00bb \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f, \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-310355","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=310355"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310355\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}