Skip to content

macsj200/AngularMap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJS RWD Image Maps

An AngularJS Directive that allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize


Usage:

  • If possible, add correct, unitless width and height attributes to your image map images. You can override these in CSS to make them responsive.
  • Add a link to jQuery in your page, preferably at the bottom just before the closing </body>
  • Include AngularJS link and angular-rwdImageMaps.js

	<img class="rwdimgmap" usemap="#YourMapName" />
	or
	<img rwdimgmap usemap="#YourMapName" />
angular.module('map', ['rwdImageMaps'])
	.controller('MapCtrl', function($scope){
		$scope.myTrigger = function(arg){
			alert(arg);
		}
	});

Demo:

Original jQuery Plugin http://mattstow.com/experiment/responsive-image-maps/rwd-image-maps.html

AngularJS Directive http://www.cowglow.com/github/rwdImageMaps


Copyright (c) 2012 Matt Stow
Licensed under the MIT license (see LICENSE for details)
Minified version created with Online YUI Compressor: http://www.refresh-sf.com/yui/

About

AngularJS Directive Responsive Image Maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.0%
  • CSS 7.0%