···5151};
52525353Dragger.prototype.bindDrag = function( element ) {
5454+ element = this.getQueryElement( element );
5455 if ( element ) {
5556 element.addEventListener( downEvent , this );
5657 }
5858+};
5959+6060+Dragger.prototype.getQueryElement = function( element ) {
6161+ if ( typeof element == 'string' ) {
6262+ // with string, query selector
6363+ element = document.querySelector( element );
6464+ }
6565+ return element;
5766};
58675968Dragger.prototype.handleEvent = function( event ) {
···101110Dragger.prototype.onmouseup =
102111Dragger.prototype.onpointerup =
103112Dragger.prototype.ontouchend =
104104-Dragger.prototype.dragEnd = function( event ) {
113113+Dragger.prototype.dragEnd = function(/* event */) {
105114 window.removeEventListener( moveEvent, this );
106115 window.removeEventListener( upEvent, this );
107107- this.onDragEnd( event );
116116+ this.onDragEnd();
108117};
109118110119return Dragger;
+1-4
js/illustration.js
···4646};
47474848Illustration.prototype.setElement = function( element ) {
4949- if ( typeof element == 'string' ) {
5050- // with string, query selector
5151- element = document.querySelector( element );
5252- }
4949+ element = this.getQueryElement( element );
5350 if ( !element ) {
5451 throw new Error( 'Zdog.Illustration element required. Set to ' + element );
5552 }