Giter VIP home page Giter VIP logo

alexeyrosspage / hiddenarea Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.5 MB

«HiddenArea» is a JQuery Plugin for watching and editing images with some unusual option: you can select any areas of your picture and hide them with a blur. You also can rotate your images clockwise and counterclockwise. «HiddenArea» allows you to save images on server safely, load them from it for editing and cache them through file names.

License: MIT License

PHP 23.27% Hack 0.13% CSS 16.90% JavaScript 59.70%
jquery-lightbox lightbox lightbox-gallery lightbox-gallery-plugin akexrosspage hiddearea ajax php imgedit

hiddenarea's Introduction

HiddenArea (jQuery plugin) — image viewer and editor

«HiddenArea» is a JQuery Plugin for watching and editing images with some unusual option: you can select any areas of your picture and hide them with a blur. You also can rotate your images clockwise and counterclockwise. «HiddenArea» allows you to save images on server safely, load them from it for editing and cache them through file names.

Just select and hide any areas of your picture

Important: your picture will be really edited, this is not just an overlaiding of a СSS property

GitHub: https://github.com/alexrosspage/hiddenarea

Demo: http://hiddenarea.epizy.com


Setting

Plugin connection

Script connection:

<script defer src="jquery_2.2.4.min.js"></script>
<!--<script defer src="main.js"></script> Helper functions can be defined here -->
<script defer src="hiddenarea.js"></script>

Plugin connection in script:

$(document).ready(function ()
{
 $('#hiddenarea').hiddenarea(
     {
         'number': 3,
         'message': 'Text below plugin'
     });
});

or directly in the body of the page, leaving the default settings

<script>$('#hiddenarea').hiddenarea();</script>

Plugin connection in HTML. You can connect the plugin several times on the page, the script will look for elements with the class "upload":

<div class="uploads" id="hiddenarea"></div>

Plugin settings

Plugin settings are defined by the «option» variable. The variable option is an object, with the following keys:

options = options || {}; //plugin configuration option

option['message'];// Message under the block, pictures. The default is empty.

option['megabyte'];// The maximum image size in megabytes. The default is 5 megabytes.

option['number'];// The number of images in the block. The default is one picture.

Plugin helper functions that can be defined before connecting in the plugin.

  1. saveError. This function is to show and/or send an error to the server. By default (if the function is not defined above), the function will display an error on the browser screen through the «alert» command.
 function saveError(error)
    {
        alert('HiddenAres error. '+error['message']+': '+error['line']);//You can comment
this line and then no errors will be displayed
    }
  1. Tip This function is needed to show hints and the result of your actions. By default (if the function is not defined above), the function will display an message on the browser screen through the «alert» command.
    $.fn.Tip=function (error)
    {
        if(typeof (error['text'])!='undefined'){
            alert(error['text']);//You can comment
this line and then no messages will be displayed
        }
    }

License

MIT

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.