Turning off animation in dojox.widget.Dialog - widget

Anyone know how to turn animation off in dojox.widget.Dialog? I love the modal dialog, but want it to pop up immediately, rather than the painfully slow animate on that it does. I tried turning off the apparent animation controls, but it still animates. Also looked into the src code, but didn't see any smoking guns for a configuration option. here's the sample invocation:
id = "dojoModalWrapper"
jsId = "dojoModalWrapper"
dojoType = "dojox.widget.Dialog"
showTitle = "false"
dimensions = "[678,370]"
sizeDuration = 0
easing = null
style = "background-color: #e86d0d; display:none;"

Why not use dijit.Dialog?

Related

How do i do i make a flickering light?

Okay so in roblox i have been trying to make a flickering light but it doesn't seem work. So i have tried finding what my error in line one is but.. it doesn't seem to work and i can't seem to find it.
while true do
math.randomseed(tick())
local Brightness = math.random(0.1 , 1)
local Light = script.Parent
local SpotLight = Light.SL
local RandomPause = (math.random(0.5 , 5))
wait(RandomPause)
SpotLight.Brightness = Brightness
wait (RandomPause)
SpotLight.Brightness = Brightness
end
Insert a spotlight into the part
Insert this script into the part:
local spotlight = game.Workspace.Light.SpotLight
while true do
spotLight.Enabled = true
wait(2)
spotLight.Enabled = false
wait(0.1)
spotLight.Enabled = true
wait(0.3)
spotLight.Enabled = false
wait(0.5)
end
You can edit the "wait(time)" as you wish to speed up the flickering or slow it down.

How to update the color of (the state of) the cell during resize in mxgraph?

I want to change the color of a state of a cell during resize of the cell.
To achieve this, I have added the following code to mxVertexHandler.prototype.updateLivePreview:
mxVertexHandler.prototype.updateLivePreview = function (me) {
...
this.state.x = this.bounds.x;
this.state.y = this.bounds.y;
this.state.origin = new mxPoint(this.state.x / scale - tr.x, this.state.y / scale - tr.y);
this.state.width = this.bounds.width;
this.state.height = this.bounds.height;
...
this.state.shape.fill = "#CCCCCC";
this.state.shape.fillOpacity = 30;
...
}
What happens is that this code changes the opacity of the cell while resized, but does not change the fill color.
How can I cange the fill color too?
Thanks,
-- Jaap
No, that does not work either.
BTW, I thought that temporal changes, e.g. during a resize, should go via the state.
I do not understand why fillOpacity (and other properties) works, and fill not. It seems that the fill is overwritten somewhere else (e.g. after calling updateLivePreview), but I can not figure out where.

Particle Effect Changing Color at runtime

I need to change color of my particle effect color according to some user event in my game for that this is what i am doing:
float temp[] = new float[4];
temp[0] = 0.937f;
temp[1] = 0.325f;
temp[2] = 0.314f;
pe.getEmitters().first().getTint().setColors(temp);
pe.start();
and in render i am doing this:
pe.draw(batch, Gdx.graphics.getDeltaTime());
but unfortunately i am getting this error:
java.lang.ArrayIndexOutOfBoundsException: length=4; index=4
at com.badlogic.gdx.graphics.g2d.ParticleEmitter$GradientColorValue.getColor(ParticleEmitter.java:1313)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter.activateParticle(ParticleEmitter.java:439)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter.addParticle(ParticleEmitter.java:154)
at com.badlogic.gdx.graphics.g2d.ParticleEmitter.draw(ParticleEmitter.java:299)
at com.badlogic.gdx.graphics.g2d.ParticleEffect.draw(ParticleEffect.java:74)
at com.approduction.game.GameScreen.render(GameScreen.java:218)
at com.badlogic.gdx.Game.render(Game.java:46)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:459)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1557)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1263)
i dont know what i am doing wrong, i read the documentation and has done everything according to it any help would be a savior... Thanks in advance..
Your float array has the wrong length.
You actually don't need to create a new array. You can avoid this problem altogether by filling your colors into the array it already has like this:
float temp[] = pe.getEmitters().first().getTint().getColors();
temp[0] = 0.937f;
temp[1] = 0.325f;
temp[2] = 0.314f;
pe.start();

Hovertool Bokeh "Cannot read property"

My problem is that in Chrome, when I have my cursor on my histogram hover my data, I have this error :
Uncaught TypeError: Cannot read property '0'
There is my code :
hist, edges = np.histogram(data,bins=3000)
plot = quad(
top=hist,
bottom=0,
left=edges[:-1],
right=edges[1:],
fill_color="#036564",
line_color="#033649",
tools="pan,wheel_zoom,box_zoom,reset, hover",
x_range=[-0.5,3.5],
plot_width=1100,
title="",
)
hover = plot.select(dict(type=HoverTool))
hover.tooltips = [('index','$index')]
resources = Resources("inline")
plot_script, plot_div = components(plot, resources)
html_script = mark_safe(encode_utf8(plot_script))
html_div = mark_safe(encode_utf8(plot_div))
figure()
return html_script, html_div
"data" is a array like this :
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.24,1,1.32,1,2,3]
I tried to add a "source" in the quad, changed the figure, changed my code for the one on the documentation but I still have my error.
For information, everything is working very well, except the hover tool.
Indeed, in the "hover box" I want another informations then just "index", but it's just for testing.
Thanks for reading !
Sorry I missed this earlier. You have uncovered a small bug with the hover tool that is particular to quad glyphs. In the mean time you can add hover.snap_to_data = False to get it to work.
Here is a GH issue you can track for the full solution:
https://github.com/bokeh/bokeh/issues/1644
A fix should be in the 0.7.1 release next Monday.
Also BTW, you are using a deprecated API. You should now write code like:
p = figure(...)
p.quad(...)

Corona widget.newButton change defaultFile

Considering I am defining some button like the following:
-- title button
titleButton = widget.newButton{
label="",
width=265, height=70,
defaultFile = "images/title.png",
overFile = "images/title_clicked.png",
onEvent = handlePlayEvent
}
titleButton:setReferencePoint(display.CenterReferencePoint)
titleButton.x = display.contentWidth / 2
titleButton.y = display.contentHeight / 4
Is it possible to modify the button's defaultFile and overFile after creation from some other function.
I have searched the docs and couldn't find anything. Any tip would be appreciated
You can't change defaultFile and overFile after its creation.
Like display.newImage(), you can't directly change the image itself unless it is an image sheet.
But you can use image sheet as a button. You can change its frame whenever you want.