mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 15:19:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1552 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4956c21e3e
commit
d3aa224003
3 changed files with 14 additions and 5 deletions
|
|
@ -168,12 +168,15 @@ function displayMultimedia(src, width, height, auto_start) {
|
|||
* @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
|
||||
**/
|
||||
function resizeImageContents() {
|
||||
var objs = xGetElementsByTagName("img");
|
||||
var objs = xGetElementsByTagName("IMG");
|
||||
for(var i in objs) {
|
||||
var obj = objs[i];
|
||||
var parent = xParent(obj);
|
||||
var parent = obj.parentNode;
|
||||
if(!obj||!parent) continue;
|
||||
|
||||
while(parent.nodeName != "TD" && parent.nodeName != "DIV") {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
if(parent.nodeName != "TD" && parent.nodeName != "DIV") continue;
|
||||
var parent_width = xWidth(parent);
|
||||
var obj_width = xWidth(obj);
|
||||
if(parent_width>=obj_width) continue;
|
||||
|
|
@ -182,6 +185,8 @@ function resizeImageContents() {
|
|||
obj.source_width = obj_width;
|
||||
obj.source_height = xHeight(obj);
|
||||
xWidth(obj, xWidth(parent)-1);
|
||||
var per = parent_width/obj_width;
|
||||
xHeight(obj, xHeight(obj)*per);
|
||||
|
||||
xAddEventListener(obj,"click", showOriginalImage);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue