{"_id":"@4keys/svg.resize.js","_rev":"2-f8d404937217e06ee365367e44a54893","name":"@4keys/svg.resize.js","dist-tags":{"latest":"1.4.3"},"versions":{"1.4.2":{"name":"@4keys/svg.resize.js","version":"1.4.2","description":"An extension for svg.js which allows to resize elements which are selected","keywords":["svg.js","resize","mouse"],"bugs":{"url":"https://github.com/svgdotjs/svg.resize.js/issues"},"license":"MIT","author":{"name":"Ulrich-Matthias Schäfer"},"contributors":{"name":"Ulrich-Matthias Schäfer"},"homepage":"https://github.com/svgdotjs/svg.resize.js","main":"dist/svg.resize.js","scripts":{"build":"gulp"},"repository":{"type":"git","url":"git+https://github.com/svgdotjs/svg.resize.js.git"},"engines":{"node":">= 0.8.0"},"devDependencies":{"del":"^2.2.2","gulp":"^3.9.1","gulp-header":"^1.8.12","gulp-iife":"^0.3.0","gulp-rename":"^1.3.0","gulp-standard":"^10.1.2","gulp-trimlines":"^1.0.1","gulp-uglify":"^2.1.2","gulp-wrap-iife":"0.0.1","natives":"1.1.3"},"dependencies":{"svg.js":"^2.6.5","svg.select.js":"^2.1.2"},"gitHead":"c06d4c07f88638c4b03934890fc9d748697c8a10","_id":"@4keys/svg.resize.js@1.4.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"saintplay","email":"saintplay96@gmail.com"},"dist":{"integrity":"sha512-r979bLT1+ffmcUEYbUuD0dCnmNory/mIlj0dAh6emAsXO9D4O178yG/1y3Z3YZHxrJNZcc3jyoi4SB/wneaTHA==","shasum":"6d36dd9432ae352792cede6f7040dee6747cb3b2","tarball":"https://registry.npmjs.org/@4keys/svg.resize.js/-/svg.resize.js-1.4.2.tgz","fileCount":5,"unpackedSize":33011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblGB4CRA9TVsSAnZWagAAztAQAJFS32hkTTfiibnEChaW\nx2XlEwqbveWbEFs0Jpb1urxMkUUkATE2hEe4/nVlK6EcaXgagm1sIXb4YMMP\nwNaR3YoTiIGsSA65qWI1plP0zVpfIiDFTrQjhMHw6dNjh1oLY+Htz2AcoVzv\ntNWmiNYHM93a7dH6t9bdFL5hQ/dG+uNd2cpY7Pev12RRUCaz/P0DBVuCzBxM\nWTYgfmBJexhB2Z5tPwHGUlb2C65eqNu0r4t1u3/3m4gJ4A9tAVoN81YljZ6y\nI/ydHKem4MGagKC9Yoy/OUaf3reqCxykWNIzMZNUyiJpcGijy+TWRlzoNZNK\nu5IzZz2W63MVPB9jZR8nUsyz3KU2wdukQlvD9XdtqGNZZ1zF/FiEpvYX77c2\nihLRc1xnP9Bho8XZ0M2tNa//diKtMA61Fu8eQdEpeHoaoWL6RPxeZAgxiOqZ\nHVsHJ7BjnbwqRHwdIMRW6IW5nz2NT1vvdI+RXn4ICo12alL4mBH/gJ8HvrOw\n+OGt21ZORlRacb67wtYwGG0LFeJq9ULNAm5AQ2FidzspXXpHObLP+ywZoWcX\nJ9ySLm0v3eNyfm9xhaBPeQ+1wxDXPUJO9apWKKR2Jn5j+kUTSfK7aCfzwT49\nu+G5qPZf6H6sKSBesUNfPyi29jiK/hIAkESH1/sq+2GF1Bc0Uu9E3yGsxBPB\nZ9YI\r\n=VIQq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGUImM1/Ysa1Iw6KF5B9OkModpvWeUaye7X3+WElyknAiAOTO9YJMaeE34IEkVWLe11Ns/G9ZYdZz2eejpthvvAVA=="}]},"maintainers":[{"name":"saintplay","email":"saintplay96@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svg.resize.js_1.4.2_1536450680066_0.14838457502729918"},"_hasShrinkwrap":false},"1.4.3":{"name":"@4keys/svg.resize.js","version":"1.4.3","description":"An extension for svg.js which allows to resize elements which are selected","keywords":["svg.js","resize","mouse"],"bugs":{"url":"https://github.com/svgdotjs/svg.resize.js/issues"},"license":"MIT","author":{"name":"Ulrich-Matthias Schäfer"},"contributors":{"name":"Ulrich-Matthias Schäfer"},"homepage":"https://github.com/svgdotjs/svg.resize.js","main":"dist/svg.resize.js","scripts":{"build":"gulp"},"repository":{"type":"git","url":"git+https://github.com/svgdotjs/svg.resize.js.git"},"engines":{"node":">= 0.8.0"},"devDependencies":{"del":"^2.2.2","gulp":"^3.9.1","gulp-header":"^1.8.12","gulp-iife":"^0.3.0","gulp-rename":"^1.3.0","gulp-standard":"^10.1.2","gulp-trimlines":"^1.0.1","gulp-uglify":"^2.1.2","gulp-wrap-iife":"0.0.1","natives":"1.1.3"},"dependencies":{"svg.js":"^2.6.5","svg.select.js":"^2.1.2"},"gitHead":"4eda66801c6dda246d7bacb46c3d9253765a088d","_id":"@4keys/svg.resize.js@1.4.3","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"saintplay","email":"saintplay96@gmail.com"},"dist":{"integrity":"sha512-cTKLHfZPt0U2G5F7V1GSdr0tAWZA7iol2fDPwZdKdBiXz3BrWZfJF37gALEFeE3HpYz3COd1ZaIPm9CWReEqWA==","shasum":"14be24437d59a0d282e9d59881b6a1d3438ddccd","tarball":"https://registry.npmjs.org/@4keys/svg.resize.js/-/svg.resize.js-1.4.3.tgz","fileCount":5,"unpackedSize":33047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmpTBCRA9TVsSAnZWagAAFwEP/2R08olNY7uEguNBcJiL\npsy324Cf6Wvbw3soEjx0U6tKrqpljlTp02BoZdE5I/VCBVdgJPBolrhspglY\nI78g0ALly0QoeqQwFLZ9oIgJEtYmOzTYiU4XSeo5u9sQovsIyI+Am9vgsaQc\nAwadsNePXG3TiosIokpIk2UNAuLZ+M2o9/hClOmxLVXlkkWSF1+OQ+ZJN4jD\nPFX2zyiJM55yDxJ/U4GMGD9M72NeNTxyQ/JFJ+ndq/SQX5BXJYiAdWEX80Vq\nDH9L0YcGUYoRu+KJCe+PixOMEikpDllGbHtU71YKe7/RQ4g/SxyZiFAFGjDz\n7KTjNGpkaEeOAp4Dhcp1tPqxv+B/UU90FqrLIN3pfzOGsFoZH2cWBJlI5Y88\nqe59ycSXYu9WJ8IYX+M9A9W+FbodukQ8p0v7Uoe45Nl+tdCJ/yWHUfvip46L\n58UrqBHiEzVMBAR6Q1xwxByJic0D6uD2+Iyr4F46SuKmcLeR/R5TNX0iJf5H\nmYs2gdxdJ/hyzEA8vV/weOGL9zEytjoDMoWZs1uioUTb+HVMTYfPaoqdGfqu\nKsRM4iEStbJEx1o9aQZErrFauhvTXP2+gL1wTwRx04wEfPxqciENuPdxcjCN\nr6Ynrp0/xDVJavx1yf39hzi/bQuSb3BNSzIwff+dJ2iKI+Fn7FMpz5ilFXjN\nh6K8\r\n=d+6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBr+Oibbuj4FSjhYrLdIQCaizUBElOIcUgILB3h962/2AiEA5JArjxNUIj/WZa/aCT1P33WwTkqKbd+43C3O0t2dGNw="}]},"maintainers":[{"name":"saintplay","email":"saintplay96@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svg.resize.js_1.4.3_1536857280284_0.511368225419619"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-08T23:51:20.025Z","1.4.2":"2018-09-08T23:51:20.269Z","modified":"2022-04-04T10:47:06.331Z","1.4.3":"2018-09-13T16:48:00.464Z"},"maintainers":[{"name":"saintplay","email":"saintplay96@gmail.com"}],"description":"An extension for svg.js which allows to resize elements which are selected","homepage":"https://github.com/svgdotjs/svg.resize.js","keywords":["svg.js","resize","mouse"],"repository":{"type":"git","url":"git+https://github.com/svgdotjs/svg.resize.js.git"},"contributors":{"name":"Ulrich-Matthias Schäfer"},"author":{"name":"Ulrich-Matthias Schäfer"},"bugs":{"url":"https://github.com/svgdotjs/svg.resize.js/issues"},"license":"MIT","readme":"svg.resize.js\r\n=============\r\n\r\nAn extension of [svg.js](https://github.com/svgdotjs/svg.js) which allows to resize elements which are selected with [svg.select.js](https://github.com/svgdotjs/svg.select.js)\r\n\r\n# Demo\r\n\r\nFor a demo see http://svgdotjs.github.io/svg.resize.js/\r\n\r\n# Get Started\r\n\r\n- Install `svg.resize.js` using bower:\r\n\r\n\t\tbower install svg.resize.js\r\n\r\n- Include the script after svg.js and svg.select.js into your page\r\n\r\n\t\t<script src=\"svg.js\"></script>\r\n\t\t<script src=\"svg.select.js\"></script>\r\n\t\t<script src=\"svg.resize.js\"></script>\r\n\r\n- Select a rectangle and make it resizeable:\r\n\r\n\t\t<div id=\"myDrawing\"></div>\r\n\r\n\t\tvar drawing = new SVG('myDrawing').size(500, 500);\r\n\t\tdrawing.rect(50,50).selectize().resize()\r\n\r\n# Usage\r\n\r\nActivate resizing\r\n\r\n    var draw = SVG('drawing');\r\n\tvar rect = draw.rect(100,100);\r\n    rect.selectize().resize();\r\n\r\nDeactivate resizing\r\n\r\n\trect.resize('stop');\r\n\r\nKeep element within constrained box\r\n\r\n\tvar draw = SVG('drawing');\r\n\tvar rect = draw.rect(100, 100);\r\n\tvar opt = {\r\n\t\tconstraint: {\r\n\t\t\tminX: 0,\r\n\t\t\tminY: 0,\r\n\t\t\tmaxX: 200,\r\n\t\t\tmaxY: 300\r\n\t\t}\r\n\t};\r\n\trect.selectize().resize(opt)\r\n\r\n\r\n# Options\r\n\r\n- `snapToGrid`: Snaps the shape to a virtual grid while resizing (default `1`)\r\n- `snapToAngle`: Snaps to an angle when rotating (default `0.1`)\r\n- `constraint`: Keep element within constrained box (see usage above); The box snaps to the grid defined by `snapToGrid`.\r\n- `saveAspectRatio`: Save aspect ratio of the element while resizing with left-top, left-bottom, right-top, right-bottom points.\r\n\r\n\r\n# Events\r\n\r\n- `resizing`: Fired when changes occur\r\n- `resizedone`: Fired when resizing is done\r\n\r\n# Known Issues\r\n\r\n- resize nested svgs does not work\r\n","readmeFilename":"README.md"}