GithubHelp home page GithubHelp logo

ext.ux.panimagecomponent's Introduction

Sencha ExtJS Image component with Pan & Zoom features


preview

Uses the Panzoom Library

https://github.com/timmywil/panzoom


Source at GitHub

https://github.com/wencywww/Ext.ux.PanImageComponent


Demos

Sencha's Fiddle: https://fiddle.sencha.com/#fiddle/3h23


Features:

  • Uses the Panzoom library to add pan/zoom capabilities to ExtJS Image component
  • Registers the 'panimage' / 'panimagecomponent' xtypes
  • Once instantiated, the Ext.Img underlying image can be panned with the mouse and zoomed (mouse wheel)
  • Tested with ExtJS version 4.2.1.883 and up to 7.5.0

Configuration options:

  • componentConfig (object) - use this to provide configuration options for the Panzoom instances (see https://github.com/timmywil/panzoom for details) default is:
    {
      animate: true,
      maxScale: 5,
      contain: 'outside'
    }

Usage:

  • Include the src/PanImage.js file, it contains the panzoom 4.4.3 minified source (Ext must be included prior to this)
  • Instantiate the class, for example:
      var panZoomImage = Ext.create('Ext.ux.PanImageComponent', renderTo:{Ext.getBody()});
    or use 'panimage'/'panimagecomponent' xtype like so:
      
      var panZoomImage = Ext.widget('panimage', {
        componentConfig: {
            maxScale: 10
          } 
      });

List of Changes

  • 2021-11-16, initial commit

ext.ux.panimagecomponent's People

Watchers

 avatar  avatar

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.