Opened 13 years ago
Closed 13 years ago
#4279 closed enhancement (fixed)
[cla/patch] dijit.Dialog unaware of visibility state
Reported by: | dante | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | bill | |
Blocked By: | Blocking: |
Description
dijit.Dialog doesn't know if its open or closed. Patch enables similar API to dijit.TitlePane?:
widget.open: Boolean
no patch for matching .toggle() api, but would be simple like:
toggle: function(){ this[(this.open ? "_hide" : "_show")](); }
after this patch. precise timing not accounted for (onEnd, beforeBegin)
Attachments (1)
Change History (5)
Changed 13 years ago by
Attachment: | dialog-openState.patch added |
---|
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Status: | new → assigned |
---|
thinking more, and hating to change the API on either, shouldn't they both be "isOpen", as the open param doesn't 'do' anything (just a Boolean)?
comment:3 Changed 13 years ago by
Summary: | [cla/patch] dijit.Dialog unaware of visibiltiy state → [cla/patch] dijit.Dialog unaware of visibility state |
---|
Well, maybe. But remember that these are parameters specified in markup too, so that the markup would become
<div dojoType="dijit.TitlePane" isOpen="true">
Does that look right? I'm not sure.
Also remember that any change to the API is supposed include a deprecation cycle with a deprecation warning. That's hard for changes to non-functions like open, but I guess it could be done by having some code that looks at the params object passed to Widget.create(). (We should be saving the params object somewhere, by the way.)
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [10361]) fixes #4279 - adds open: param/API to Dialog (though does not make start open, like TitlePane? open="true") ... is true when open, false when hidden.
(no need to change to isOpen: sounds silly and who wants deprecated calls anyway?)
Sure, looks fine to me.