├── .gitignore ├── LICENSE.txt ├── README.md ├── angular-areas.js ├── bower.json ├── css ├── angular-areas.css ├── bt-delete.png ├── filter.svg └── outline.gif └── src └── main └── webapp ├── bower_components ├── angular │ ├── .bower.json │ ├── README.md │ ├── angular-csp.css │ ├── angular.js │ ├── angular.min.js │ ├── angular.min.js.gzip │ ├── angular.min.js.map │ ├── bower.json │ ├── index.js │ └── package.json └── jquery │ ├── .bower.json │ ├── MIT-LICENSE.txt │ ├── bower.json │ ├── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map │ └── src │ ├── ajax.js │ ├── ajax │ ├── jsonp.js │ ├── load.js │ ├── parseJSON.js │ ├── parseXML.js │ ├── script.js │ ├── var │ │ ├── nonce.js │ │ └── rquery.js │ └── xhr.js │ ├── attributes.js │ ├── attributes │ ├── attr.js │ ├── classes.js │ ├── prop.js │ ├── support.js │ └── val.js │ ├── callbacks.js │ ├── core.js │ ├── core │ ├── access.js │ ├── init.js │ ├── parseHTML.js │ ├── ready.js │ └── var │ │ └── rsingleTag.js │ ├── css.js │ ├── css │ ├── addGetHookIf.js │ ├── curCSS.js │ ├── defaultDisplay.js │ ├── hiddenVisibleSelectors.js │ ├── support.js │ ├── swap.js │ └── var │ │ ├── cssExpand.js │ │ ├── getStyles.js │ │ ├── isHidden.js │ │ ├── rmargin.js │ │ └── rnumnonpx.js │ ├── data.js │ ├── data │ ├── Data.js │ ├── accepts.js │ └── var │ │ ├── data_priv.js │ │ └── data_user.js │ ├── deferred.js │ ├── deprecated.js │ ├── dimensions.js │ ├── effects.js │ ├── effects │ ├── Tween.js │ └── animatedSelector.js │ ├── event.js │ ├── event │ ├── ajax.js │ ├── alias.js │ └── support.js │ ├── exports │ ├── amd.js │ └── global.js │ ├── intro.js │ ├── jquery.js │ ├── manipulation.js │ ├── manipulation │ ├── _evalUrl.js │ ├── support.js │ └── var │ │ └── rcheckableType.js │ ├── offset.js │ ├── outro.js │ ├── queue.js │ ├── queue │ └── delay.js │ ├── selector-native.js │ ├── selector-sizzle.js │ ├── selector.js │ ├── serialize.js │ ├── sizzle │ └── dist │ │ ├── sizzle.js │ │ ├── sizzle.min.js │ │ └── sizzle.min.map │ ├── traversing.js │ ├── traversing │ ├── findFilter.js │ └── var │ │ └── rneedsContext.js │ ├── var │ ├── arr.js │ ├── class2type.js │ ├── concat.js │ ├── hasOwn.js │ ├── indexOf.js │ ├── pnum.js │ ├── push.js │ ├── rnotwhite.js │ ├── slice.js │ ├── strundefined.js │ ├── support.js │ └── toString.js │ └── wrap.js ├── demo ├── angularjsORG.jpg ├── app.js ├── demo-controller.js ├── demo.css └── index.html └── inspiration └── jquery.selectareas.js /.gitignore: -------------------------------------------------------------------------------- 1 | /.settings/ 2 | 3 | ###################### 4 | # Windows 5 | ###################### 6 | # Windows image file caches 7 | Thumbs.db 8 | 9 | # Folder config file 10 | Desktop.ini 11 | 12 | ###################### 13 | # Mac OSX 14 | ###################### 15 | .DS_Store 16 | .svn 17 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 delkant 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # angular-areas 2 | Angular Directive ( ng-areas ) that let you select and manipulate multiple areas on an image, create, edit, move and resize them too. 3 | 4 | # Quick Start 5 | #### Install with Bower 6 | ```sh 7 | $ bower install angular-areas 8 | ``` 9 | 10 | 11 | ## Use like so: 12 | ```sh 13 |
14 | 21 |
22 | ``` 23 | 24 | ## DEMO and example to learn from. 25 | Check out the [DEMO](https://rawgit.com/delkant/angular-areas/master/src/main/webapp/demo/index.html) 26 | 27 | ## Browser Compatibiilty: 28 | This plugin is fully compatible with every modern browser and IE >= 9. 29 | 30 | # API Doc 31 | 32 | ## Area 33 | An area is described (when retrieved or set) by a json object: 34 | 35 | ```sh 36 | { 37 | x, // X coordinate (Position) 38 | y, // Y coordinate (Position) 39 | z, // Z-index (0 when inactive or 100 when focused) 40 | width, // Width of the area (Size) 41 | height // Height of the area (Size) 42 | } 43 | ``` 44 | 45 | ## Options and parameters 46 | Here is a list of available options for selectAreas, with their *default value*: 47 | - **ng-areas** : Required attribute. Area list **areas** (*[]*) : list of areas to add to the image from the beginning (id will be ignored); 48 | 49 | controller i.e.: 50 | ```sh 51 | $scope.areasArray = [ { 52 | "x" : 557, 53 | "y" : 35, 54 | "z" : 100, 55 | "height" : 130, 56 | "width" : 925, 57 | "name" : "Menu Options", 58 | "cssClass" : "class_red", 59 | "id" : 37, 60 | "description" : "Menu" 61 | }, { 62 | "x" : 822, 63 | "y" : 274, 64 | "z" : 0, 65 | "height" : 250, 66 | "width" : 829, 67 | "name" : "AngularJS Main Logo", 68 | "cssClass" : "class_red", 69 | "id" : 35, 70 | "description" : "AngularJS Main Logo" 71 | } ]; 72 | ``` 73 | template i.e.: 74 | ```sh 75 | 76 | ``` 77 | 78 | - **ng-areas-width** (*0*) : When not 0, scale the image to this width (px). 79 | 80 | - **ng-areas-extend-data** each area will have the properties defined on this JSON object. 81 | This can be used when you have multiple images with areas on them and you want to know to what image belongs a area-box. 82 | You could also use this to create tags to identify the fields. 83 | 84 | - **ng-areas-allow** : Json Object 85 | 86 | i.e. ng-areas-allow="{'edit':true, 'move':true, 'resize':false, 'select':true, 'remove':false, 'nudge':false}" 87 | 88 | - **edit** (*true*) : When set to false, unset allowMove, allowResize, allowSelect and allowDelete 89 | - **move** (*true*) : When set to false, Areas can not be moved with a drag & drop. 90 | - **resize** (*true*) : When set to false, Areas can not be resized. 91 | - **select** (*true*) : When set to false, Areas can not be created. 92 | - **remove** (*true*) : When set to false, Areas can not be removed. 93 | - **nudge** (*true*) : When set to false, Areas can not be moved with arrow keys. 94 | 95 | 96 | ## Events handlers 97 | Three events are fired by the plugin: 98 | - **ng-areas-on-remove** (*null*): fired a selected area is removed. arguments : (event, id, areas, area) 99 | - **ng-areas-on-add** (*null*): fired when a selection is released. arguments : (event, id, areas, area) 100 | - **ng-areas-on-change** (*null*) : triggered when the event "changed" is fired. arguments : (event, id, areas, area) 101 | 102 | 103 | ## Event listeners / subscribers 104 | So far one event is listening by the plugin: 105 | - on "ngAreas:renameByAreaId" 106 | 107 | usage 108 | 109 | ```sh 110 | $scope.$broadcast("ngAreas:renameByAreaId", { 111 | areaid : areaid, 112 | name : "a new Label or Name for this box" 113 | }); 114 | ``` 115 | 116 | 117 | 118 | ## LICENSE 119 | ```sh 120 | MIT 121 | ``` 122 | 123 | 124 | Inspired by https://github.com/360Learning/jquery-select-areas 125 | 126 | 127 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-areas", 3 | "authors": [ 4 | "delkant " 5 | ], 6 | "description": "Directive that let you select and manipulate multiple areas of an image, move them and resize them too.", 7 | "main": "angular-areas.js", 8 | "dependencies": { 9 | "angular": "1.4.8", 10 | "jquery": "2.1.4" 11 | }, 12 | "moduleType": [ 13 | "globals" 14 | ], 15 | "keywords": [ 16 | "angular", 17 | "select", 18 | "areas", 19 | "image", 20 | "directive" 21 | ], 22 | "license": "MIT", 23 | "homepage": "https://github.com/delkant/angular-areas", 24 | "ignore": [ 25 | "**/.*", 26 | "node_modules", 27 | "bower_components", 28 | "src/main/webapp/bower_components", 29 | "test", 30 | "tests" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /css/angular-areas.css: -------------------------------------------------------------------------------- 1 | .border-medium { 2 | border-width: 2px; 3 | border-style: solid; 4 | border-radius: 5px; 5 | } 6 | 7 | .border-thin { 8 | border-width: 1px; 9 | border-style: solid; 10 | border-radius: 3px; 11 | } 12 | 13 | .select-area-field-label { 14 | font-size: 11px; 15 | background-color: floralwhite; 16 | padding: 2px; 17 | position: relative; 18 | top: -20px; 19 | left: -40px; 20 | } 21 | 22 | .select-areas-overlay { 23 | background-color: #000; 24 | overflow: hidden; 25 | position: absolute; 26 | } 27 | 28 | .blurred { 29 | /*filter: url("/filters.svg#blur3px"); 30 | -webkit-filter: blur(3px); 31 | -moz-filter: blur(3px); 32 | -o-filter: blur(3px); 33 | filter: blur(3px);*/ 34 | 35 | } 36 | 37 | .select-areas-outline { 38 | background: url('outline.gif'); 39 | overflow: hidden; 40 | padding: 2px; 41 | } 42 | 43 | .select-areas-resize-handler { 44 | border: 2px #fff solid; 45 | height: 10px; 46 | width: 10px; 47 | overflow: hidden; 48 | background-color: #000; 49 | } 50 | 51 | .select-areas-delete-area { 52 | background: url('bt-delete.png'); 53 | cursor: pointer; 54 | height: 20px; 55 | width: 20px; 56 | } 57 | 58 | .delete-area { 59 | position: absolute; 60 | cursor: pointer; 61 | padding: 1px; 62 | } -------------------------------------------------------------------------------- /css/bt-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/delkant/angular-areas/8a3bc6752e72ac34d93553c5ebd4aba33725d1db/css/bt-delete.png -------------------------------------------------------------------------------- /css/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /css/outline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/delkant/angular-areas/8a3bc6752e72ac34d93553c5ebd4aba33725d1db/css/outline.gif -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.4.8", 4 | "main": "./angular.js", 5 | "ignore": [], 6 | "dependencies": {}, 7 | "homepage": "https://github.com/angular/bower-angular", 8 | "_release": "1.4.8", 9 | "_resolution": { 10 | "type": "version", 11 | "tag": "v1.4.8", 12 | "commit": "572a4fcc552c27c0f4bb1b9aab395249218c1255" 13 | }, 14 | "_source": "git://github.com/angular/bower-angular.git", 15 | "_target": "1.4.8", 16 | "_originalSource": "angular" 17 | } -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/README.md: -------------------------------------------------------------------------------- 1 | # packaged angular 2 | 3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the 4 | [main AngularJS repo](https://github.com/angular/angular.js). 5 | Please file issues and pull requests against that repo. 6 | 7 | ## Install 8 | 9 | You can install this package either with `npm` or with `bower`. 10 | 11 | ### npm 12 | 13 | ```shell 14 | npm install angular 15 | ``` 16 | 17 | Then add a ` 21 | ``` 22 | 23 | Or `require('angular')` from your code. 24 | 25 | ### bower 26 | 27 | ```shell 28 | bower install angular 29 | ``` 30 | 31 | Then add a ` 35 | ``` 36 | 37 | ## Documentation 38 | 39 | Documentation is available on the 40 | [AngularJS docs site](http://docs.angularjs.org/). 41 | 42 | ## License 43 | 44 | The MIT License 45 | 46 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a copy 49 | of this software and associated documentation files (the "Software"), to deal 50 | in the Software without restriction, including without limitation the rights 51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 52 | copies of the Software, and to permit persons to whom the Software is 53 | furnished to do so, subject to the following conditions: 54 | 55 | The above copyright notice and this permission notice shall be included in 56 | all copies or substantial portions of the Software. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 64 | THE SOFTWARE. 65 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/angular-csp.css: -------------------------------------------------------------------------------- 1 | /* Include this file in your html if you are using the CSP mode. */ 2 | 3 | @charset "UTF-8"; 4 | 5 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], 6 | .ng-cloak, .x-ng-cloak, 7 | .ng-hide:not(.ng-hide-animate) { 8 | display: none !important; 9 | } 10 | 11 | ng\:form { 12 | display: block; 13 | } 14 | 15 | .ng-animate-shim { 16 | visibility:hidden; 17 | } 18 | 19 | .ng-anchor { 20 | position:absolute; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/angular.min.js.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/delkant/angular-areas/8a3bc6752e72ac34d93553c5ebd4aba33725d1db/src/main/webapp/bower_components/angular/angular.min.js.gzip -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.4.8", 4 | "main": "./angular.js", 5 | "ignore": [], 6 | "dependencies": { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/index.js: -------------------------------------------------------------------------------- 1 | require('./angular'); 2 | module.exports = angular; 3 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.4.8", 4 | "description": "HTML enhanced for web apps", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/angular/angular.js.git" 12 | }, 13 | "keywords": [ 14 | "angular", 15 | "framework", 16 | "browser", 17 | "client-side" 18 | ], 19 | "author": "Angular Core Team ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/angular/angular.js/issues" 23 | }, 24 | "homepage": "http://angularjs.org" 25 | } 26 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.4", 4 | "main": "dist/jquery.js", 5 | "license": "MIT", 6 | "ignore": [ 7 | "**/.*", 8 | "build", 9 | "dist/cdn", 10 | "speed", 11 | "test", 12 | "*.md", 13 | "AUTHORS.txt", 14 | "Gruntfile.js", 15 | "package.json" 16 | ], 17 | "devDependencies": { 18 | "sizzle": "2.1.1-jquery.2.1.2", 19 | "requirejs": "2.1.10", 20 | "qunit": "1.14.0", 21 | "sinon": "1.8.1" 22 | }, 23 | "keywords": [ 24 | "jquery", 25 | "javascript", 26 | "library" 27 | ], 28 | "homepage": "https://github.com/jquery/jquery-dist", 29 | "_release": "2.1.4", 30 | "_resolution": { 31 | "type": "version", 32 | "tag": "2.1.4", 33 | "commit": "7751e69b615c6eca6f783a81e292a55725af6b85" 34 | }, 35 | "_source": "git://github.com/jquery/jquery-dist.git", 36 | "_target": "2.1.4", 37 | "_originalSource": "jquery" 38 | } -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 jQuery Foundation and other contributors 2 | http://jquery.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.4", 4 | "main": "dist/jquery.js", 5 | "license": "MIT", 6 | "ignore": [ 7 | "**/.*", 8 | "build", 9 | "dist/cdn", 10 | "speed", 11 | "test", 12 | "*.md", 13 | "AUTHORS.txt", 14 | "Gruntfile.js", 15 | "package.json" 16 | ], 17 | "devDependencies": { 18 | "sizzle": "2.1.1-jquery.2.1.2", 19 | "requirejs": "2.1.10", 20 | "qunit": "1.14.0", 21 | "sinon": "1.8.1" 22 | }, 23 | "keywords": [ 24 | "jquery", 25 | "javascript", 26 | "library" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/src/ajax/jsonp.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "./var/nonce", 4 | "./var/rquery", 5 | "../ajax" 6 | ], function( jQuery, nonce, rquery ) { 7 | 8 | var oldCallbacks = [], 9 | rjsonp = /(=)\?(?=&|$)|\?\?/; 10 | 11 | // Default jsonp settings 12 | jQuery.ajaxSetup({ 13 | jsonp: "callback", 14 | jsonpCallback: function() { 15 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 16 | this[ callback ] = true; 17 | return callback; 18 | } 19 | }); 20 | 21 | // Detect, normalize options and install callbacks for jsonp requests 22 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 23 | 24 | var callbackName, overwritten, responseContainer, 25 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 26 | "url" : 27 | typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" 28 | ); 29 | 30 | // Handle iff the expected data type is "jsonp" or we have a parameter to set 31 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 32 | 33 | // Get callback name, remembering preexisting value associated with it 34 | callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 35 | s.jsonpCallback() : 36 | s.jsonpCallback; 37 | 38 | // Insert callback into url or form data 39 | if ( jsonProp ) { 40 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 41 | } else if ( s.jsonp !== false ) { 42 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 43 | } 44 | 45 | // Use data converter to retrieve json after script execution 46 | s.converters["script json"] = function() { 47 | if ( !responseContainer ) { 48 | jQuery.error( callbackName + " was not called" ); 49 | } 50 | return responseContainer[ 0 ]; 51 | }; 52 | 53 | // force json dataType 54 | s.dataTypes[ 0 ] = "json"; 55 | 56 | // Install callback 57 | overwritten = window[ callbackName ]; 58 | window[ callbackName ] = function() { 59 | responseContainer = arguments; 60 | }; 61 | 62 | // Clean-up function (fires after converters) 63 | jqXHR.always(function() { 64 | // Restore preexisting value 65 | window[ callbackName ] = overwritten; 66 | 67 | // Save back as free 68 | if ( s[ callbackName ] ) { 69 | // make sure that re-using the options doesn't screw things around 70 | s.jsonpCallback = originalSettings.jsonpCallback; 71 | 72 | // save the callback name for future use 73 | oldCallbacks.push( callbackName ); 74 | } 75 | 76 | // Call if it was a function and we have a response 77 | if ( responseContainer && jQuery.isFunction( overwritten ) ) { 78 | overwritten( responseContainer[ 0 ] ); 79 | } 80 | 81 | responseContainer = overwritten = undefined; 82 | }); 83 | 84 | // Delegate to script 85 | return "script"; 86 | } 87 | }); 88 | 89 | }); 90 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/src/ajax/load.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../core/parseHTML", 4 | "../ajax", 5 | "../traversing", 6 | "../manipulation", 7 | "../selector", 8 | // Optional event/alias dependency 9 | "../event/alias" 10 | ], function( jQuery ) { 11 | 12 | // Keep a copy of the old load method 13 | var _load = jQuery.fn.load; 14 | 15 | /** 16 | * Load a url into a page 17 | */ 18 | jQuery.fn.load = function( url, params, callback ) { 19 | if ( typeof url !== "string" && _load ) { 20 | return _load.apply( this, arguments ); 21 | } 22 | 23 | var selector, type, response, 24 | self = this, 25 | off = url.indexOf(" "); 26 | 27 | if ( off >= 0 ) { 28 | selector = jQuery.trim( url.slice( off ) ); 29 | url = url.slice( 0, off ); 30 | } 31 | 32 | // If it's a function 33 | if ( jQuery.isFunction( params ) ) { 34 | 35 | // We assume that it's the callback 36 | callback = params; 37 | params = undefined; 38 | 39 | // Otherwise, build a param string 40 | } else if ( params && typeof params === "object" ) { 41 | type = "POST"; 42 | } 43 | 44 | // If we have elements to modify, make the request 45 | if ( self.length > 0 ) { 46 | jQuery.ajax({ 47 | url: url, 48 | 49 | // if "type" variable is undefined, then "GET" method will be used 50 | type: type, 51 | dataType: "html", 52 | data: params 53 | }).done(function( responseText ) { 54 | 55 | // Save response for use in complete callback 56 | response = arguments; 57 | 58 | self.html( selector ? 59 | 60 | // If a selector was specified, locate the right elements in a dummy div 61 | // Exclude scripts to avoid IE 'Permission Denied' errors 62 | jQuery("
").append( jQuery.parseHTML( responseText ) ).find( selector ) : 63 | 64 | // Otherwise use the full result 65 | responseText ); 66 | 67 | }).complete( callback && function( jqXHR, status ) { 68 | self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); 69 | }); 70 | } 71 | 72 | return this; 73 | }; 74 | 75 | }); 76 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/src/ajax/parseJSON.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Support: Android 2.3 6 | // Workaround failure to string-cast null input 7 | jQuery.parseJSON = function( data ) { 8 | return JSON.parse( data + "" ); 9 | }; 10 | 11 | return jQuery.parseJSON; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Cross-browser xml parsing 6 | jQuery.parseXML = function( data ) { 7 | var xml, tmp; 8 | if ( !data || typeof data !== "string" ) { 9 | return null; 10 | } 11 | 12 | // Support: IE9 13 | try { 14 | tmp = new DOMParser(); 15 | xml = tmp.parseFromString( data, "text/xml" ); 16 | } catch ( e ) { 17 | xml = undefined; 18 | } 19 | 20 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 21 | jQuery.error( "Invalid XML: " + data ); 22 | } 23 | return xml; 24 | }; 25 | 26 | return jQuery.parseXML; 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /src/main/webapp/bower_components/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../ajax" 4 | ], function( jQuery ) { 5 | 6 | // Install script dataType 7 | jQuery.ajaxSetup({ 8 | accepts: { 9 | script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 10 | }, 11 | contents: { 12 | script: /(?:java|ecma)script/ 13 | }, 14 | converters: { 15 | "text script": function( text ) { 16 | jQuery.globalEval( text ); 17 | return text; 18 | } 19 | } 20 | }); 21 | 22 | // Handle cache's special case and crossDomain 23 | jQuery.ajaxPrefilter( "script", function( s ) { 24 | if ( s.cache === undefined ) { 25 | s.cache = false; 26 | } 27 | if ( s.crossDomain ) { 28 | s.type = "GET"; 29 | } 30 | }); 31 | 32 | // Bind script tag hack transport 33 | jQuery.ajaxTransport( "script", function( s ) { 34 | // This transport only deals with cross domain requests 35 | if ( s.crossDomain ) { 36 | var script, callback; 37 | return { 38 | send: function( _, complete ) { 39 | script = jQuery(" 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 |

Angular Image Areas Directive Demo

21 | 22 |
23 | 		<img ng-areas="fields" 
24 | 	
25 |
26 | 		ng-areas-allow="{'edit':true, 'move':true, 'resize':true, 'select':true, 'remove':true, 'nudge':true}" 
27 | 	
28 |
29 | 		ng-areas-width="900" src="angularjsORG.jpg">
30 |   	
31 |
32 | 39 |
Event Log: {{log900}}
40 | 41 | 48 |
Event Log: {{log600}}
49 | 50 |
51 | 52 | 53 | --------------------------------------------------------------------------------