Popover display in openlayer map - popover

Popover in openlayer map, when it is appearing in the extreme ends, the content of the popover is not visible. It goes beyond the map area. Is there any way to adjust it accordingly as it will be visible inside the map and all its content get displayed other than scrolling??

You can make use of the (experimental) autoPan option. It is disabled by default, so be sure to include to include the option when you create your Overlay for your popup, e.g.
var overlay = new ol.Overlay(({
element: <your-element>,
autoPan: true,
autoPanAnimation: {
duration: 250
}
}));
Also see the official OL3 popup example.
If you do not like to use the autoPan option, then I would to refer to the comment given by Jonatas Walker.

Related

Modifying scroll behavior in BottomSheet in Jetpack Compose

By default, in the ModalBottomSheetLayout in Jetpack Compose, when you try to scroll its content, instead of scrolling, the bottom sheet expands itself. Is there any way I can change this behavior and limit the max height of the bottom sheet? I want to be able to scroll the content and not expand the sheet.
I tried looking into the source code of ModalBottomSheet and it looks like it always gets the touch events first and only passes it down to the content when it has fully utilised them. I am not sure how to reverse this behavior, so, the content should always get the scroll events and only if it cannot consume it, it should go to the bottom sheet.

CKEditor 4 - Removing Image Toolbar Button Causes Image Dialog to No Longer Display Width and Height Properties

I am using CKEditor 4 and trying to customize a toolbar to show to non-Admin users of our software. I know how to remove the "Image" button from the toolbar to prevent non-Admins from inserting image elements into our templates. However, I still want them to be able to edit an existing image within a template by double-clicking on it. With the Image insert button removed, I can still perform this action and the resulting dialog displays the source, alt text, and image preview portions. But, the Width, Height, and Ratio Lock controls are hidden. Upon inspecting the markup, it looks as though the table of class cke_dialog_ui_hbox that resides several nodes up from the txtWidth container has an inline display style set to none.
Is there a way to hide / not show the Insert Image toolbar button while still displaying the width, height, and ratio lock controls in the Image dialog box?
I have tried using config.removeButtons as well as config.toolbar and specifying the buttons that I want displayed in the insert group but the presence of the button or not appears to impact the plugin functionality by arbitrarily hiding certain controls.
I learned through Fiddling that the styles attribute on an img definition in the allowedContent object determines whether or not the width and height fields display in the image dialog box.
CKEDITOR.editorConfig = function( config ) {
allowedContent = {
img: {
attributes: true,
classes: true,
styles: 'width,height'
}
}
};
Either I missed that in the documentation somewhere or it just wasn't readily apparent to me.
Fiddle:
https://jsfiddle.net/a913q0mz/
Sounds like the best solution will be to hide the button with CSS.
In your theme (e.g. ckeditor/skins/moona-lisa) open editor.css and add this at the bottom:
a.cke_button.cke_button__image { display: none; }
Save and do a force refresh (Ctrl-Shift-[click refresh]) and you should be good.

NativeScript animated Modal Page

I need Modal Page appears with "slide from bottom and cover (NOT push) current page" transition.
I set parameter animated of showModal method, but nothing changed.
How implement such transition for Modal Page? Android platform.
it's bug github.com/NativeScript/NativeScript/issues/5989
I have kinda hacky stuff, wrapping my elements with AbsoluteLayout and give it a high top value like '800',
and in navigatedTo function make transition animation with the negative value of the top attribute. In your case you would use left attribute and make transition over x.
Another solution that looks better in the UI, adding a custom component that would act as your modal, wrap your page elements with AbsoluteLayout, add your custom component when you need to show your modal, and apply the previous animation hack to it.
Tip: You can set the actionBarHiddin = true if you want to your custom component to overlay the full screen.
Tip: async/await and then would be very useful for the smoothing matters.

How to change background color of modal-dialog on Google Apps Script UI built with GUI?

I'm trying to change the background color of the modal-popup in a google SpreadsheetApp built with on GUI. .setStyleAttribute() does not seem to work here. I've also tried to set the style after the GUI component is loaded - no dice.
var app = UiApp.createApplication().setHeight("400") // - works fine, height of modal-dialog is pushed by UiApp height
.setStyleAttribute("background", "black"); // works for Ui element - not for outermost modal-dialog
//load the GUI component
app.add(app.loadComponent("GradeChallengesGUI"));
Perhaps it is not possible to change the background of the modal-dialog? Elements nested underneath are easily modified. I just can't get to the top parent of the UI. At this point, I'm assuming this isn't possible?
Could add everything to a panel type, set bg of the panel, add it to the app.
As you're loading the UI you've created in GUI Builder you can set the background color right there. Choose the top component and set the background color property.
If you prefer code you can do something like this:
app.getElementById("Component1").setStyleAttribute("background", "black");
"Component1" is a default ID for the first top element in GUI Builder.

dojo Show/Hide One ContentPane While Another ContentPane Is Liquid

I've been struggling for weeks trying to crack this nut so I'm not sure if it's impossible, or if it's my lack of coding chops... or both. I'm not a programmer and I'm a newbie to Dojo Toolkit.
I have a site using the BorderContainer layout. I'm trying to create an effect where I can use a button to open and close a dropdown type box that will contain controls. I need this dropdown to be hidden on page load, and then open when you click the button.
My problem is that when I open the dropdown, it pushes the content pane below it off the bottom of the browser window. I need the lower ContentPane to stay fit within the remaining space of the browser window when the dropdown opens. Additionally, I want the dropdown to sit outside of the scrollable container for the content below it, which is why I have it set up to sit outside a nested BorderContainer below it.
I've created a simplified version of the code to demonstrate my challenge (see link below). If you load the page you can see the center ContentPane scrolls the content. But, if you then click on the button, a dropdown div expands above the content. Then when you scroll, you'll notice that you can't see the full pane because it's in no-man's-land below the bottom of the browser window. I assume that because the div is set to display:none on load, it's size is not accounted for on page load. Then, when you open it by pressing the button, it's size is additive and the pane below doesn't know how to resize or account for the new element.
I've tried using the visibility attribute, but that leaves a gap for the div when it's still closed. I've tinkered with some code that controls the height that shows promise, but each of my dropdown boxes will be different sizes so I'd prefer that the height be set to "auto" rather than a specified pixel size.
Does anyone have any idea how I can accomplish this so that the lower pane will fit in the space without pushing off the screen?
Here's a sample of the page:
http://equium.com/scaffold.html
(I had some problems trying to insert the full HTML page here as a code sample so if that's a preferable way to handle it, and someone can let me know the best way to embed all of that code, I'd appreciate it.)
Thanks is advance, I'd really apprecaite anyone's feedback.
You might want to take a look at dojox.layout.ExpandoPane (though be warned I think it has only worked properly for top and left regions for a while).
Also, I'd suggest simplifying/altering your layout a bit. See example here:
http://jsfiddle.net/taFzv/
(It'd probably need some tweaking to get exactly what you want.)
The real issue you're having is probably that the BorderContainer has no idea that parts of the view resized. ExpandoPane takes care of that by telling the BorderContainer to re-layout after its animation completes.
It works under IE8.0. When dropdown box open, just keep pressing mouse from page and drag to bottom, you could see the content was pushed to out of page. It looks the browser could not detect it and could not add it to "scroll bar" account.
I would suggest taking out all BorderContainers except your top level one, the one with mainPage as the id.
Place your {stuff here} div into the mainPage BorderContainer, after the ContentPane with the Close/Open button. Make sure you make it dojotype dijit.layout.ContentPane, set up layoutpriority, and set region to top. Set the height to 0/x when clicking the Open/Close button, instead of setting display.
Try your page again. If that doesn't fix it, you probably need, a call to layout, resize, or both to indicate to the BorderContainer that it needs to evaluate all its children and size the "center" pane properly. Something like dijit.byId("mainPage").layout(); Do this any time someone presses the Close/Open button, after you have changed the height of any BorderContainer children.
Maybe the dijit.form.DropDownButton would fit your needs. When click the button a tooltip is displayed that can be filled with any content you want. Just as you specified, the dropdown tooltip is only displayed when you click the button, and it doesn't mess with the underlying layout at all. The tooltip sits "on top" of the page.

Resources