mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Make OpenSeadragon W3C compliant.
This commit is contained in:
parent
f18909d0ec
commit
f7d65fa4cb
@ -120,18 +120,23 @@ $.Button = function( options ) {
|
|||||||
* @member {Element} element
|
* @member {Element} element
|
||||||
* @memberof OpenSeadragon.Button#
|
* @memberof OpenSeadragon.Button#
|
||||||
*/
|
*/
|
||||||
this.element = options.element || $.makeNeutralElement( "button" );
|
this.element = options.element || $.makeNeutralElement( "div" );
|
||||||
|
|
||||||
//if the user has specified the element to bind the control to explicitly
|
//if the user has specified the element to bind the control to explicitly
|
||||||
//then do not add the default control images
|
//then do not add the default control images
|
||||||
if( !options.element ){
|
if ( !options.element ) {
|
||||||
this.imgRest = $.makeTransparentImage( this.srcRest );
|
this.imgRest = $.makeTransparentImage( this.srcRest );
|
||||||
this.imgGroup = $.makeTransparentImage( this.srcGroup );
|
this.imgGroup = $.makeTransparentImage( this.srcGroup );
|
||||||
this.imgHover = $.makeTransparentImage( this.srcHover );
|
this.imgHover = $.makeTransparentImage( this.srcHover );
|
||||||
this.imgDown = $.makeTransparentImage( this.srcDown );
|
this.imgDown = $.makeTransparentImage( this.srcDown );
|
||||||
this.imgDiv = $.makeNeutralElement( "div" );
|
|
||||||
|
|
||||||
this.imgDiv.style.position = "relative";
|
this.imgRest.alt =
|
||||||
|
this.imgGroup.alt =
|
||||||
|
this.imgHover.alt =
|
||||||
|
this.imgDown.alt =
|
||||||
|
this.tooltip;
|
||||||
|
|
||||||
|
this.element.style.position = "relative";
|
||||||
|
|
||||||
this.imgGroup.style.position =
|
this.imgGroup.style.position =
|
||||||
this.imgHover.style.position =
|
this.imgHover.style.position =
|
||||||
@ -159,11 +164,10 @@ $.Button = function( options ) {
|
|||||||
"";
|
"";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.imgDiv.appendChild( this.imgRest );
|
this.element.appendChild( this.imgRest );
|
||||||
this.imgDiv.appendChild( this.imgGroup );
|
this.element.appendChild( this.imgGroup );
|
||||||
this.imgDiv.appendChild( this.imgHover );
|
this.element.appendChild( this.imgHover );
|
||||||
this.imgDiv.appendChild( this.imgDown );
|
this.element.appendChild( this.imgDown );
|
||||||
this.element.appendChild( this.imgDiv );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ $.ButtonGroup = function( options ) {
|
|||||||
* @member {Element} element
|
* @member {Element} element
|
||||||
* @memberof OpenSeadragon.ButtonGroup#
|
* @memberof OpenSeadragon.ButtonGroup#
|
||||||
*/
|
*/
|
||||||
this.element = options.element || $.makeNeutralElement( "fieldgroup" );
|
this.element = options.element || $.makeNeutralElement( "div" );
|
||||||
|
|
||||||
// TODO What if there IS an options.group specified?
|
// TODO What if there IS an options.group specified?
|
||||||
if( !options.group ){
|
if( !options.group ){
|
||||||
|
@ -128,7 +128,7 @@ $.Control = function ( element, options, container ) {
|
|||||||
this.element.style.height = "100%";
|
this.element.style.height = "100%";
|
||||||
this.element.style.width = "100%";
|
this.element.style.width = "100%";
|
||||||
} else {
|
} else {
|
||||||
this.wrapper = $.makeNeutralElement( "span" );
|
this.wrapper = $.makeNeutralElement( "div" );
|
||||||
this.wrapper.style.display = "inline-block";
|
this.wrapper.style.display = "inline-block";
|
||||||
if ( this.anchor == $.ControlAnchor.NONE ) {
|
if ( this.anchor == $.ControlAnchor.NONE ) {
|
||||||
// IE6 fix
|
// IE6 fix
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
$.extend( true, this, {
|
$.extend( true, this, {
|
||||||
id: 'controldock-'+$.now()+'-'+Math.floor(Math.random()*1000000),
|
id: 'controldock-'+$.now()+'-'+Math.floor(Math.random()*1000000),
|
||||||
container: $.makeNeutralElement('form'),
|
container: $.makeNeutralElement( 'div' ),
|
||||||
controls: []
|
controls: []
|
||||||
}, options );
|
}, options );
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ $.Navigator = function( options ){
|
|||||||
|
|
||||||
$.Viewer.apply( this, [ options ] );
|
$.Viewer.apply( this, [ options ] );
|
||||||
|
|
||||||
this.element.getElementsByTagName('form')[0].appendChild( this.displayRegion );
|
this.element.getElementsByTagName( 'div' )[0].appendChild( this.displayRegion );
|
||||||
unneededElement = this.element.getElementsByTagName('textarea')[0];
|
unneededElement = this.element.getElementsByTagName('textarea')[0];
|
||||||
if (unneededElement) {
|
if (unneededElement) {
|
||||||
unneededElement.parentNode.removeChild(unneededElement);
|
unneededElement.parentNode.removeChild(unneededElement);
|
||||||
|
@ -447,7 +447,7 @@ function loadPanels( strip, viewerSize, scroll ) {
|
|||||||
element: miniViewer.displayRegion
|
element: miniViewer.displayRegion
|
||||||
} );
|
} );
|
||||||
|
|
||||||
element.getElementsByTagName( 'form' )[0].appendChild(
|
element.getElementsByTagName( 'div' )[0].appendChild(
|
||||||
miniViewer.displayRegion
|
miniViewer.displayRegion
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ $.Viewer = function( options ) {
|
|||||||
*/
|
*/
|
||||||
element: null,
|
element: null,
|
||||||
/**
|
/**
|
||||||
* A <form> element (provided by {@link OpenSeadragon.ControlDock}), the base element of this Viewer instance.<br><br>
|
* A <div> element (provided by {@link OpenSeadragon.ControlDock}), the base element of this Viewer instance.<br><br>
|
||||||
* Child element of {@link OpenSeadragon.Viewer#element}.
|
* Child element of {@link OpenSeadragon.Viewer#element}.
|
||||||
* @member {Element} container
|
* @member {Element} container
|
||||||
* @memberof OpenSeadragon.Viewer#
|
* @memberof OpenSeadragon.Viewer#
|
||||||
|
Loading…
Reference in New Issue
Block a user