Changeset 8961 for extensions/GrumPluginClasses/js/simpleTip.js
- Timestamp:
- Jan 28, 2011, 4:54:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/js/simpleTip.js
r7175 r8961 2 2 * ----------------------------------------------------------------------------- 3 3 * file: simpleTip.js 4 * file version: 1.0. 05 * date: 2010- 07-104 * file version: 1.0.1 5 * date: 2010-12-23 6 6 * 7 7 * JS file provided by the piwigo's plugin "GrumPluginClasses" … … 30 30 * 31 31 * | release | date | 32 * | 1.0.0 | 2010 /07/10 | start to coding32 * | 1.0.0 | 2010-07-10 | start to coding 33 33 * | | | 34 * | | |34 * | 1.0.1 | 2010-12-23 | fix minor bugs 35 35 * | | | 36 36 * | | | … … 70 70 offsetY:0, 71 71 classes:'', 72 arrowImgDir: ' ./plugins/GrumPluginClasses/icons/',72 arrowImgDir: '', 73 73 arrowWidth: 12, 74 arrowHeight: 12 ,74 arrowHeight: 12 75 75 }, 76 76 options … … 84 84 itemIndexInc = 0, 85 85 options={ 86 name:'' ,86 name:'' 87 87 }; 88 88 … … 150 150 { 151 151 title: '', 152 simpleTip: tip.index ,152 simpleTip: tip.index 153 153 } 154 154 ) … … 253 253 left: '-1500px', 254 254 top: '-1500px', 255 display: 'block' ,255 display: 'block' 256 256 } 257 257 ); … … 306 306 307 307 308 stWidth=$('#iSimpleTip ').outerWidth();309 stHeight=$('#iSimpleTip ').outerHeight();310 stWidthI=$('#iSimpleTip ').innerWidth();311 stHeightI=$('#iSimpleTip ').innerHeight();308 stWidth=$('#iSimpleTipContent'+options.name).outerWidth(); 309 stHeight=$('#iSimpleTipContent'+options.name).outerHeight(); 310 stWidthI=$('#iSimpleTipContent'+options.name).innerWidth(); 311 stHeightI=$('#iSimpleTipContent'+options.name).innerHeight(); 312 312 bwX=(stWidth-stWidthI)/2; 313 313 bwY=(stHeight-stHeightI)/2; … … 321 321 y+=items[itemIndex].options.offsetY; 322 322 arrowX=-bwX; 323 arrowY=- 10-bwY;323 arrowY=-items[itemIndex].options.arrowHeight+bwY; 324 324 arrowModel='up'; 325 325 break; … … 328 328 x-=stWidth/2; 329 329 y+=items[itemIndex].options.offsetY; 330 arrowX=(stWidthI- 10)/2;331 arrowY=- 10-bwY;330 arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2; 331 arrowY=-items[itemIndex].options.arrowHeight+bwY; 332 332 arrowModel='up'; 333 333 break; … … 336 336 x-=stWidth+items[itemIndex].options.offsetX; 337 337 y+=items[itemIndex].options.offsetY; 338 arrowX=stWidthI- 10+bwX;339 arrowY=- 10-bwY;338 arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX; 339 arrowY=-items[itemIndex].options.arrowHeight+bwY; 340 340 arrowModel='up'; 341 341 break; 342 342 343 343 case 'middle-left': 344 x+=items[itemIndex].options.offsetX; 344 345 y-=stHeight/2; 345 arrowX=- 10-bwX;346 arrowY=(stHeightI- 10)/2;346 arrowX=-items[itemIndex].options.arrowWidth+bwX; 347 arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY; 347 348 arrowModel='left'; 348 349 break; … … 357 358 y-=stHeight/2; 358 359 arrowX=stWidthI+bwX; 359 arrowY=(stHeightI- 10)/2;360 arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY; 360 361 arrowModel='right'; 361 362 break; 362 363 363 364 case 'bottom-left': 365 x+=items[itemIndex].options.offsetX; 364 366 y-=stHeight+items[itemIndex].options.offsetY; 365 367 arrowX=-bwX; … … 371 373 x-=stWidth/2; 372 374 y-=stHeight+items[itemIndex].options.offsetY; 373 arrowX=(stWidthI- 10)/2;375 arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2+bwX; 374 376 arrowY=stHeightI+bwY; 375 377 arrowModel='down'; … … 379 381 x-=stWidth+items[itemIndex].options.offsetX; 380 382 y-=stHeight+items[itemIndex].options.offsetY; 381 arrowX=stWidthI- 10+bwX;383 arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX; 382 384 arrowY=stHeightI+bwY; 383 385 arrowModel='down'; … … 394 396 marginTop: arrowY+'px', 395 397 width: items[itemIndex].options.arrowWidth+'px', 396 height: items[itemIndex].options.arrowHeight+'px' ,398 height: items[itemIndex].options.arrowHeight+'px' 397 399 } 398 400 ); … … 409 411 left: x+'px', 410 412 top: y+'px', 411 display: 'none' ,413 display: 'none' 412 414 } 413 415 )
Note: See TracChangeset
for help on using the changeset viewer.