Eric,

Have you ever made a popup also a dropzone?

I would like a popup that has a number of coloured boxes that represent 
fields I can drop content into. eg a link

just asking.

Thanks
Tones

On Wednesday, 28 July 2021 at 01:53:40 UTC+10 Eric Shulman wrote:

> On Tuesday, July 27, 2021 at 8:00:40 AM UTC-7 Ste wrote:
>
>> I like the ability to set the pop up direction. 
>>
>
> The popup position is automatically calculated based on the $button that 
> invokes it, combined with the position="..." keywords.
> However, there are MANY more possibilities by using a bit of CSS to adjust 
> the position, like this:
>
> <$button popup=<<qualify "$:/state/popup/myPopup">>> CLICK ME! </$button>
> <$reveal state=<<qualify "$:/state/popup/myPopup">> type="popup" 
> position="belowright">
>    <div class="tc-drop-down" style="transform:translate(0,calc(-50% - 
> 1em));">
>       POPUP CONTENT HERE
>       <p/>
>       SOME MORE CONTENT
>       <p/>
>       ETC.
>    </div>
> </$reveal>
>
> Notes:
> 1) In the example above, we use "transform:translate(0,calc(-50% - 1em));" 
> to shift the popup y-offset up by half the height of the popup less 1em 
> extra to account for the height of the $button text
> 2) The result is that the popup appears directly to the right of the 
> $button, but is now vertically centered with the $button text
> 3) Of course, you can use X,Y values in the translate(...) to adjust the 
> position to put it exactly where you want, with much finer control than 
> just using the built-in position="..." param
>
> enjoy,
> -e
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/46aa066c-9624-458a-8c42-22e61af4ceean%40googlegroups.com.

Reply via email to