Pointer events for multiple absolute positioned elements - absolute

I am trying to sync an Openlayers and a Google Maps element.
Both elements are positioned absolute on top of each other in a Parent element.
<div id="Parent">
<div id="Bottom"></div>
<div id="Top"></div>
</div>
Drag (pan) and scroll (zoom change) pointer events are only received by the Top element.
Is it possible to pass events to two absolute positioned siblings?
I have created a codepen for this with the pointer-events set to none for the Top element. This enables the pointer events for the Bottom element.
https://codepen.io/dbauszus-glx/pen/WNMmRrq

Related

card-footer not stay at the bottom of horizontal card bootstrap

I am using horizontal bootstrap card and I want to align a text at the end of the second column. I tried to use card-footer but it doesn't seems to work example. Is there a way to achieve this.
card-body and card-footer only automatically align themselves properly, and as Bootstrap's example shows when they are directly under the card class. However given your layout, you'd need the col-md-8 to be a flex with column direction.
So add the classes d-flex flex-column to your col-md-8 and your footer will stick to the bottom of the second column. JSFiddle

Angular material how to position mat-sidenav top or bottom

I am new to angular material. From angular material doc i can see it can be positioned 'start' or 'end'.
<div style="border:solid 1px red;">
<mat-sidenav-container>
<mat-sidenav class="sidenav"
position="end" <!-- want to position top or bottom here-->
[opened]="sidenavOption.open"
[mode]="sidenavOption.mode">
Sidenav content
</mat-sidenav>
<ng-content></ng-content>
</mat-sidenav-container>
</div>
I would like to position 'top' or 'bottom'
Can anyone help me how to do this?
Thanks
AFAIK the sidenav as the name suggests can only be present on the right (end) or left (start) side of your page. Even though the material design specifications allow a bottom drawer (here).
As stated here there is no other property than position to specify the position other than left or right.
It seems that you would either need to make your own implementation of such a drawer -But for that you can extend from the material design classes and build upon them- or you could use a MatBottomSheet, which is almost the same, but can only be used as a kind of bottom drawer.

Scroll droppable area while scrolling

I have list of draggable elements in one div and list of droppable elements in another div.I want to pick the elem from draggable elements and drop on droppable elements. I have scroll for droppable container. While dragging and dropping, If the draggable element reaches the end position on droppable container, I need the droppable container to be scrolled (i.e the default behaviour of browser scroll, when mouse point reaches to end point it automatically scrolls).
I am using jquery drag and drop component. The droppable container scroll is not page scroll. I have so many divs and so many scrolls in the page and one of them is droppable container list.
my code is:
elem.addClass(randomClass)
.draggable({ appendTo: "body, helper: 'clone' });
Currently, the droppable container is not scrolling while dragging on droppable area. I have seen all the solutions but did not get what I need. All the solutions are related to page scrolls. Please help me.

Jquery droppable using centre of dragged element rather than cursor position

I have a table where each row is draggable using JQuery ui. These rows can be dropped into another droppable element on the page. I'm using the cursorAt option to set the cursor to be centred on the x axis and just to the left of the dragged row whilst dragging so not to obscure the data . My problem is I can only drop the content when the centre of the draggable object is inside the droppable one. I need it to be able to drop the draggable object based upon the cursor position. I.e the cursor is inside the droppable object when dragging but the actual draggable object(helper) is outside.
Hopefully this makes sense...
Any ideas?
Thanks

A <canvas> element inside a <div> disappears. What gives?

I've placed a <canvas> element inside a <div> and it disappears. What gives?
I'd like to to make the canvas element (processing.js) resizable using jQuery.
It may be that your canvas has no height and the div is collapsing into an invisible horizontal line and is not displaying overflow. To get a better answer you'd need to post your html.

Resources