GithubHelp home page GithubHelp logo

delkant / angular-areas Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 11.0 843 KB

Angular Directive ( ng-areas ) that let you select and manipulate multiple areas on an image, create, edit, move them and resize them too.

License: MIT License

CSS 2.96% JavaScript 92.31% HTML 4.73%

angular-areas's People

Contributors

delkant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

angular-areas's Issues

How to instantiate a dynamic area of arrays with a speicific height and width

The array of aras is dynamic, and on click, the area which gets created needs to be a specific width and height.
I have tried with following:
First try:
$scope.onAddArea = function (ev, box, areas, area) {
box.height = 50;
box.width = 50;

Second Try with ng-areas-extend-data:
<img alt="signature" ng-areas="Signatures" ng-areas-width="800"
ng-areas-on-add="onAddArea"
ng-areas-extend-data="{height:50,width:300}"

None of these open up the area with the specific size. Could you please help?

Something wrong with area coordinates?

I'm selecting an area on an image and outputting x, y width and height in a table to the right. My image is 600px * 260px. However despite my area is in the lower right corner of the image, I receive x = 448 (though it must be about 600) and y = 193 (must be about 260).
Is it an issue, or may it be that I'm doing something wrong?

Thank you for your time.

bildschirmfoto 2016-12-06 um 14 15 05

Button to add another area

Hello,
i want to make a button to add an area with a specific datas :
I tried like this :

 $scope.addAnotherMarker =function () {
            var Newareas =
                {
                    "x": 957,
                    "y": 335,
                    "z": 500,
                    "height": 75,
                    "width": 75,
                    "name": "name",
                    "cssClass": 'class_red' ,
                    "id":'3',
                    "description": "Menu"
                }
            ;
            var x = angular.fromJson($scope.fields900);
            console.log(x);
            x.push(Newareas);
       
// Set my variable 
           $scope.fields900 = x;
        }

But it didnt refresh my areas

Problem in minification

Error after minification.

Just change the
controller : function($scope, $element, $attrs) {

for
controller : ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {

and in line 903 change to:
}],

Event to Change areas dynamically

Hello,
Thanks for this awesome plugin,
But i have a litle problem :

How i can make an event to change the point instantly.
For the moment i have tried this in my controller :

$scope.ChangeAreas = function () {
            var NewtestData = [{
                "x": 557,
                "y": 135,
                "z": 500,
                "height": 75,
                "width": 75,
                "name": '',
                "cssClass": "marker_add mrk1",
                "id": 37,
                "description": "Menu"
            }];
            $scope.fields900 = NewtestData.slice(0);
            $scope.$apply();
            console.log('change')
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.