Zorn的DragDrop库 - swapImage()函数查询 [英] Zorn's DragDrop Library - swapImage() function query
本文介绍了Zorn的DragDrop库 - swapImage()函数查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为页面的许多部分使用伟大的dd.dragdrop库,包括通过swapImage()加载用户选择的图像。函数。
I''m using the great dd.dragdrop Library for many parts of the page, including loading in a user selected image via the "swapImage()" function.
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号
推荐答案
欢迎来到TSDN!
>
预加载图像并获取其高度和宽度,并将replaceMe的属性设置为:
Welcome to TSDN!
Preload the image and get its height and width and set replaceMe''s properties to these:
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号
谢谢,但这似乎无法将H& V值加载到必要的resizeTo()中。函数。
我正在使用dragdrop库进行交换,缩放和移动图像。我似乎无法访问replaceMe1。图像的H& W直接,但需要使用图书馆的'resizeTo()"功能。硬编号工作;
dd.elements.replaceMe1.resizeTo(630,730);
这个使用变量的脚本不是!
Thank you, but this seems to fail loading the H&V values into the necessary "resizeTo()" function.
I''m using the dragdrop Library for swapping, scaling and moving the image. I can''t seem to access the "replaceMe1" image''s H&W directly, but need to use the Library''s "resizeTo()" function. Hard numbers work;
dd.elements.replaceMe1.resizeTo(630, 730);
this script using variables doesn''t!
展开 | 选择 | Wrap | 行号
您可能需要确保图像已完全加载。 myWidth和myHeight的值是否正确?
You may need to make sure that the image has fully loaded. Are the values of myWidth and myHeight correct?
这篇关于Zorn的DragDrop库 - swapImage()函数查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文