'top':bounds.y+'px'\r
});\r
\r
- // var topDiv =subdivs.eq(0);\r
- // var centralDiv = subdivs.eq(1);\r
- // var bottomDiv = subdivs.eq(2);\r
- // console.log('presize');\r
- // console.log('width: '+ topDiv.width()+' css-minWidth: ' +topDiv.css('minWidth')+' css-width: ' +topDiv.css('width')+' css-maxWidth: ' +topDiv.css('maxWidth'));\r
- // console.log('width: '+centralDiv.width()+' css-minWidth: ' +centralDiv.css('minWidth')+' css-width: ' +centralDiv.css('width')+' css-maxWidth: ' +centralDiv.css('maxWidth'));\r
- // console.log('width: '+bottomDiv.width()+' css-minWidth: ' +bottomDiv.css('minWidth')+' css-width: ' +bottomDiv.css('width')+' css-maxWidth: ' +bottomDiv.css('maxWidth'));\r
- // console.log(' ' );\r
+// var topDiv =subdivs.eq(0);\r
+// var centralDiv = subdivs.eq(1);\r
+// var bottomDiv = subdivs.eq(2);\r
+// console.log('presize');\r
+// console.log('width: '+ topDiv.width()+' css-minWidth: ' +topDiv.css('minWidth')+' css-width: ' +topDiv.css('width')+' css-maxWidth: ' +topDiv.css('maxWidth'));\r
+// console.log('width: '+centralDiv.width()+' css-minWidth: ' +centralDiv.css('minWidth')+' css-width: ' +centralDiv.css('width')+' css-maxWidth: ' +centralDiv.css('maxWidth'));\r
+// console.log('width: '+bottomDiv.width()+' css-minWidth: ' +bottomDiv.css('minWidth')+' css-width: ' +bottomDiv.css('width')+' css-maxWidth: ' +bottomDiv.css('maxWidth'));\r
+// console.log(' ' );\r
};\r
\r
p.postSizeFcn = function(){\r
+ \r
//set title and close button to span whole width, if necessary\r
//closeButton.outerWidth should be zero if this.showClose = false\r
//titleInput.outerWidth(true) should be equal to titleInput.width(), as margins borders and padding are zero, however we want to calculate it safely\r
var maxWidth = div.width();\r
var width = centralDiv.outerWidth(true);\r
\r
- if(maxHeight<=0 || maxWidth<=0){\r
- //centralDiv.hide();\r
- return;\r
- }\r
\r
- // if(maxHeight<height){\r
- // centralDiv.css('maxHeight',maxHeight+'px');\r
- // }\r
+ \r
+ \r
\r
//setting centralDiv maxHeight is buggy and not the same behaviour in all browsers\r
//so we set a height, which will be reset in preSizeFcn\r
- centralDiv.css('height',maxHeight+'px');\r
+ if(maxHeight>0){\r
+ centralDiv.css('height',maxHeight+'px');\r
+ }\r
//same for width\r
- centralDiv.css('width',maxWidth+'px');\r
+ //centralDiv.css('width',maxWidth+'px');\r
\r
- //TODO: check padding margins border or set them to zero in preSizeFcn!!!!!!\r
-\r
-\r
- // centralDiv.css('width',maxWidth+'px');\r
- // if(maxWidth<width){\r
- // centralDiv.css('maxWidth',maxWidth+'px');\r
- // }\r
+ \r
\r
//to be put AT THE END otherwise bug in IE7\r
centralDiv.css('overflow','auto');\r
//centralDiv.css('height',maxHeight);\r
//}\r
\r
- //last thing: the subelements width property seems to be handles in different ways across browsers:\r
- //in preSizeFcn, we set a width to auto. Curiously, when resizing the parent div (this.getDiv()), subelements are assigned\r
- //a specified width property\r
- //IE does what it is expected (werird enogh...), ie sets a maxWidth and\r
+ \r
+\r
+// console.log('postsize');\r
+// console.log('width: '+ topDiv.width()+' css-minWidth: ' +topDiv.css('minWidth')+' css-width: ' +topDiv.css('width')+' css-maxWidth: ' +topDiv.css('maxWidth'));\r
+// console.log('width: '+centralDiv.width()+' css-minWidth: ' +centralDiv.css('minWidth')+' css-width: ' +centralDiv.css('width')+' css-maxWidth: ' +centralDiv.css('maxWidth'));\r
+// console.log('width: '+bottomDiv.width()+' css-minWidth: ' +bottomDiv.css('minWidth')+' css-width: ' +bottomDiv.css('width')+' css-maxWidth: ' +bottomDiv.css('maxWidth'));\r
+// console.log(' ' );\r
\r
- // console.log('postsize');\r
- // console.log('width: '+ topDiv.width()+' css-minWidth: ' +topDiv.css('minWidth')+' css-width: ' +topDiv.css('width')+' css-maxWidth: ' +topDiv.css('maxWidth'));\r
- // console.log('width: '+centralDiv.width()+' css-minWidth: ' +centralDiv.css('minWidth')+' css-width: ' +centralDiv.css('width')+' css-maxWidth: ' +centralDiv.css('maxWidth'));\r
- // console.log('width: '+bottomDiv.width()+' css-minWidth: ' +bottomDiv.css('minWidth')+' css-width: ' +bottomDiv.css('width')+' css-maxWidth: ' +bottomDiv.css('maxWidth'));\r
- // console.log(' ' );\r
if(this.isClickElement(this.invoker)){\r
this.placeAsPopup();\r
}else{\r
};
this.getIndex = function(){
return index;
- }
+ };
//end=======================================================
//creating public methods:
this.getLabel = function(){
return label;
- }
+ };
this.getRulerWidth = function(){
return rulerDiv.width();
- }
+ };
this.getWaveHeight = function(){
return waveImgDiv.height();
- }
+ };
this.positionInPixels = 0;
this.positionAsViewerRatio = 0;
path.setAttributeNS(null,'class',canvasClass);
this.moveCanvas = function(pixelOffset){
canvas.setAttributeNS( null, "transform", "translate("+pixelOffset+",0)");
- }
+ };
this.jQueryCanvas = $J(canvas);
}else{
canvas = this.createCanvasVml(waveImgDiv, arrowBaselineWidth);
this.moveCanvas = function(pixelOffset){
//for some reason, coordinates inside the VML object are stored by raphael with a zoom of 10:
this.jQueryCanvas.css('left',(10*pixelOffset)+'px');
- }
+ };
//apparently, when resizing the markers loose their attributes. Therefore:
var r = this.refreshPosition; //reference to current refreshPosition
this.refreshPosition = function(){