1 line
24 KiB
Plaintext
1 line
24 KiB
Plaintext
![]() |
{"version":3,"file":"g2-brush.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 1c6a07b265900d71928f","webpack:///./index.js","webpack:///./src/brush.js","webpack:///./src/util.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Brush\"] = factory();\n\telse\n\t\troot[\"Brush\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1c6a07b265900d71928f","/**\n * g2-brush\n * @author sima.zhang1990@gmail.com\n */\nvar Brush = require('./src/brush');\nmodule.exports = Brush;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * g2-brush\n * @author sima.zhang1990@gmail.com\n */\nvar Util = require('./util');\nvar BRUSH_TYPES = ['X', 'Y', 'XY', 'POLYGON'];\n\nvar Brush = function () {\n function Brush(cfg) {\n _classCallCheck(this, Brush);\n\n /**\n * keep the first mousedown point\n * @type {object}\n */\n this.startPoint = null;\n /**\n * keep the brush state\n * @type {Boolean}\n */\n this.brushing = false;\n /**\n * keep the drag state\n * @type {Boolean}\n */\n this.dragging = false;\n /**\n * the brush shape\n * @type {G.Shape}\n */\n this.brushShape = null;\n /**\n * the brush container\n * @type {G.Group}\n */\n this.container = null;\n /**\n * keep polygon path\n * @type {String}\n */\n this.polygonPath = null;\n /**\n * brush style\n * @type {Object}\n */\n this.style = {\n fill: '#C5D4EB',\n opacity: 0.3,\n lineWidth: 1,\n stroke: '#82A6DD'\n };\n /**\n * brush
|