How to make pointer of react-leaflet popup point to the marker? - react-leaflet

How can I make the arrow on the pop-up box on a React-Leaftlet Popup point to the marker, instead of the bottom right of the box, as in the figure below?
Here is my code for the popup:
<Popup>
<span>
<p>Foo</p>
</span>
</Popup>
I am using the Popup.js code from the react-leaflet repository examples folder. In that class, I don't see an option for setting an offset.
Even just removing that downward pointing arrow might be good enough.
Thanks,

you can style the tip with leaflet-popup-tip css class. depending on your needs you can modify the position using css.
for example hiding the tip
.leaflet-popup-tip {
display:none;
}

Related

Material UI component with arrow

Is there a Material UI component that is like a container/box with an arrow coming out of it like tooltips can do? I'll insert a screenshot of what I'm trying to do below. The only way I can think of right now is to just use tooltip and set open to always be true, but i was hoping there was an already built component for this that i just cant find
I am pretty sure MUI doesn't have a component like that. Otherwise you should customize a Paper component, Popper or Box or style a div.

Preventing vue2-leaflet map from overlaying itself on top of Vuetify's navigation drawer

I'm using Vuetify to build an app that displays local points of interest. The app uses vue2-leaflet to display the maps. Unfortunately the map pokes out of navigation drawers, dialogs, and darkener screen overlays. Here are images demonstrating it:
How can I fix it?
In my opinion if z-index needs to be changed: it's better modifying the map itself - rather than Vuetify's css which can affect other components across the app.
In the component where leaflet map is registered add
<style lang="scss">
.vue2leaflet-map {
z-index: 1;
}
</style>
This works for me using Vuetify + Vue2-leaflet (latest for today's date).
Haven't noticed any issues with other Vuetify components so far.
This is a z-index issue. Try adding the following to your CSS:
.v-navigation-drawer--temporary {
z-index: 1001;
}
You can see a working example on Codepen. I think this is the minimum z-index value that will get you the overlay that you want, but you may have to play around with it until you get the right value.
NOTE: this solution only works for navigation drawers. You'll probably have to tweak the z-index values in custom CSS separately for other types of components like dialogs. Alternatively, you might be able to find where the z-index is set in the Leaflet CSS and modify that instead. I'm more familiar with Vuetify so that's what I tweaked.

ZK ListBox Paging Button Size Issue

Continuing with ZK studies, i had improved my knowledge about data binding and some .zul files components properties. So i read about properties of the Grids from here:
https://www.zkoss.org/wiki/ZK_Component_Reference/Data/Grid
My goal this time is to change the grid's paging button size (example of grid)
https://www.zkoss.org/_w/images/b/b9/ZKComRef_Grid_Paging.png
The document tells about paging, paginal properties and sorting but there is nothing about the property related with the buttons generated on the grid. Any suggestions about it? i'm glad to hear them out. Thanks for your time and attention.
These are things we need to solve with css.
I'll try to explain how we come to this, so you can css almost everything.
First of all, open your browser developertools and inspect the button element.
When you do that, you see what css class is added to that button.
In all 4 buttons we find the css class : z-paging-button
With this info we can adjust our css (in a css file or for fast local changes in a zul file with the style tag.)
<style>
.z-paging-button {
width:300px;
}
</style>
Sometimes, it's possible the css won't take, just try adding !important in the css.
Some example where you need to do this is for black digits in an disabled datebox :
<datebox disabled="true" style="color:black !important;" />

Style dijit.form.Select drop down menu

How can I style a dijit.form.Select drop down menu if a use the HTML markup.
<select id="sourceselect" dojoType="dijit.form.Select" style='width:200px' onChange="changeDetected();">
</select>
To make it clear it want to style the drop down menu that is filled with the content. I want to change the height of that menu and have a scroll bar if the height is exceeded.
I am using Dojo version 1.6. Here is a Fiddle example: http://jsfiddle.net/NH7dd/.
Edit: Why the minuses?
The menu that is generated by Dojo is placed in the root of the DOM node. It's a common mistake that the menu is somehow relative positioned towards the textfield, but it isn't.
If you wish to change the style of the menu, then you could use the following CSS selector:
div[dijitpopupparent="sourceselect"] > .dijitMenu {
/** Your CSS */
}
The reason this works is because the menu is wrapped inside a dijit/popup. This popup allows displaying/hiding the menu and as you can see it has an attribute dijitpopupparent which has the original ID of the field.
I also updated your JSFiddle, which now looks like this. But I don't really recommend changing the behavior of the menu like this, since you might mess up the original functionality/behavior of the combobox. I mean, right now I have problems going to certain values because one "scroll tick" already passes a value. With the updated style I can't even properly select "2" anymore.
EDIT: In the updated JSFiddle the scrollbar will always be visible, if you want the scrollbar only to appear when there are more options, then change overflow-y: scroll to overflow-y: auto.
You can set the property for maxHeight.
<select id="sourceselect"
dojoType="dijit.form.Select"
data-dojo-props="maxHeight: 200"
style='width:200px'
onChange="changeDetected();">
</select>
Also, the newer syntax for dojo is "data-dojo-type" instead of "dojoType".
Here is JSFiddle showing the maxHeight property. (I used dojo 1.9, but maxHeight is available in 1.6)
http://jsfiddle.net/NH7dd/17/

TinyMCE toolbar at the top of the page

I have Div with contentEditable on it.
I want TinyMCE toolbar sit at the top of the page at a specific place I mention (may be in a div) which can be used to edit contents in contentEditable div.
Someone tell me how to do this please?
Sorry, but what you intend to make sounds a bit silly.
Why don't you use tinymce as its designed to be?
You can assign a tinymce editor instance to your div and tinymce will take care of everything else
tinyMCE.execCommand("mceAddControl", false, div_id);