Dojo Dijit对话框相对位置。可能吗? [英] Dojo Dijit Dialog relative position. is it possible?

查看:181
本文介绍了Dojo Dijit对话框相对位置。可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Dojo的Dijit Dialog相对于我的一个HTML元素。可能吗?
如果是的话。如何?

I want to position Dojo's Dijit Dialog relative to one of my html element. is it Possible? If yes. How?

目前它总是显示在视口中间的对话框。

currently it always shows dialog in middle of viewport.

任何人都可以帮助我?

谢谢。

amar4kintu

amar4kintu

推荐答案

我通过使用dojo调整dijit.dialog的默认绝对位置来做到这一点。

I did that by adjusting default absolute position of dijit.dialog using dojo..

我使用以下代码重新调整对话框的绝对位置到我想要的..

I used following code to readjust absolute position of dialog to what I want..

dijit.byId('dialog').show();

dojo.style('dialog','background-color','#AAAAAA');

var co = dojo.coords('period'); // element below which I want to display dialog

dojo.style('md1','top',(co.y + 25)+'px');
dojo.style('md1','left', co.x+'px');

希望这会帮助某人..

Hopefully this will help someone..

谢谢。

amar4kintu

amar4kintu

这篇关于Dojo Dijit对话框相对位置。可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆