webpackJsonp([72],{"2jES":function(t,e){},QA0e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("Dd8w"),i=n.n(o),r=n("NYxO"),l=(n("wuJz"),n("9G5k"),{created:function(){},data:function(){return{pointsArr:[[0,20],[30,20],[10,0]],collectionArr:[]}},mounted:function(){this.collectionArr.push(this.pointsArr),this.collectionArr.push([[20,30],[50,30],[50,50],[20,50]]),this.collectionArr.push([[60,3],[50,20],[70,40],[80,30],[70,20],[80,0]]),this.drawPolygons()},computed:i()({},Object(r.b)(["tableHeight"]),{selection:function(){return this.$refs.table.selection.map(function(t){return t.id})}}),methods:{drawPolygons:function(){var t=document.getElementById("areaCanvas");if(null!=t&&t.getContext){var e=t.getContext("2d");this.drawPolygonByPoint(e,null);var n=this;t.onmousemove=function(o){e.clearRect(0,0,t.width,t.height);var i=n.getLocation(t,o.clientX,o.clientY);n.drawPolygonByPoint(e,i)}}},drawPolygonByPoint:function(t,e){var n=this;this.collectionArr.map(function(o){null!=e&&1==inside(e,o)?n.drawHighLightPolygon(t,o):n.drawGeneralPolygon(t,o)})},drawGeneralPolygon:function(t,e){t.beginPath();for(var n=0;n<e.length;n++)0==n?t.moveTo(e[n][0],e[n][1]):n<e.length-1?t.lineTo(e[n][0],e[n][1]):(t.lineTo(e[n][0],e[n][1]),t.closePath(),t.stroke())},drawHighLightPolygon:function(t,e){t.beginPath();for(var n=0;n<e.length;n++)0==n?t.moveTo(e[n][0],e[n][1]):n<e.length-1?t.lineTo(e[n][0],e[n][1]):(t.lineTo(e[n][0],e[n][1]),t.fillStyle="#FF7F00",t.fill(),t.closePath(),t.stroke())},getLocation:function(t,e,n){var o=t.getBoundingClientRect();return[(e-o.left)*(t.width/o.width),(n-o.top)*(t.height/o.height)]}}}),a={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticStyle:{width:"700px",height:"500px"}},[e("canvas",{staticStyle:{border:"1px solid red",width:"100%",height:"90%"},attrs:{id:"areaCanvas"}})])])}]};var c=n("VU/8")(l,a,!1,function(t){n("2jES")},"data-v-4d44d298",null);e.default=c.exports}});