how to add functionality of removing node/element joint js - backbone.js

I want to implement a functionality in which when I click on joint.js node extended by backbone view a div should appear around this element which will contain cross button and arrow button.
When clicked on cross the node should be removed from paper of joint js when clicked on arrow user should be able to draw arrow. when click on other part of paper that div around element should disappear.
I am following this link http://jointjs.com/tutorial/html-elements.
what is the best approach of implementing this functionality as my own approach of hiding and showing divs around element is not working.

Related

Ag-Grid keep custom filter open during interaction with dropdown

I have a custom filter component I'm giving Ag grid for each column. The component contains a dropdown. When user selects an option from dropdown, the filter closes immediately on selection rather than staying open like it should.
How can I keep the filter component to stay open on selection of option from dropdown?
Reading the docs more, I found the answer here:
https://www.ag-grid.com/javascript-data-grid/component-filter/#custom-filters-containing-a-popup-element
Custom Filters Containing a Popup Element
Sometimes you will need to create custom components for your filters that also contain popup elements. This is the case for Date Filter as it pops up a Date Picker. If the library you use anchors the popup element outside of the parent filter, then when you click on it the grid will think you clicked outside of the filter and hence close the column menu.
There are two ways you can get fix this problem:
Add a mouse click listener to your floating element and set it to
preventDefault(). This way, the click event will not bubble up to the
grid. This is the best solution, but you can only do this if you are
writing the component yourself.
Add the ag-custom-component-popup CSS
class to your floating element. An example of this usage can be found
here: Custom Date Component

Checkbox is not getting clicked properly in testproject or andriod app

i have an android app where it has 3 checkboxes in a view. All three controls are of type andriod.widget.checkbox. Along with these checkboxes there is a text content as well. Inside that text content, there is a link also. Now my aim is to click on that checkboxes. But when i click on the checkbox with testproject recording on, for one checkbox it is not getting checked though it is getting clicked and for the other two checkboxes, the link inside the checkbox is getting clicked and link is getting opened. Since it is a single view component, i could not differentiate between checkbox and the text. i have attached the testproject element explorer view and the screen view.
If you need to tap on a specific part of a mobile element (both Android or iOS), you can use the Tap element at relative point action.
You can hover the wrapper element of the element you want to tap on, double shift to capture it, and select the “Tap at relative point” action, by providing the Horizontal tap percentage and the Vertical tap percentage (notice: it starts from the top-left corner of the element) you will be able to tap on a specific point on the wrapper element.
Here you can read more about it and find an example here.

react-window-infinite-loader material-ui autocomplete

I am trying to show an infinite scrolled list inside a material-ui Autocomplete dropdown list, using react-window-infinite-loader. When I scroll to the bottom of the list, I want to fetch the next page of items from the server. I created a codesandbox example which combines the material-ui Autocomplete example for a virtualized list with the react-window-infinite-loader example. When I scroll to the bottom of the list, the next page of data is loaded, however something is causing the list to scroll back to the top. How can I keep the scroll position after new data is loaded?
Thanks!
I got this to work by using the useAutocomplete hook. I created a sandbox which shows the working code:
https://codesandbox.io/s/material-demo-0fbyb
There is only one problem, that I still cannot figure out. When pressing the down arrow key on the keyboard to select items in the list, you can select items beyond the visible "window" of items. There must be a way to get the list to scroll to the selected item. I am guessing this is because the autocomplete ref needs to be set on the FixedSizeList component, but how can I do this when the InfiniteLoader also needs to pass a ref to the FixedSizeList component?

Display other elements next to md-tab but below the tabs header

I'm new to Angular Material and just found out about the md-tabs directive. I was wondering whether there is an easy way to insert a non-md-tab element to sit on the left (or right) of all md-tab elements, but below the tabs header.
Mockup of what I am looking for:
I guess I could just duplicate the markup and insert it into every single tab, but that doesn't seem to be a very practical solution. In any case, just adding a non-md-tab element as first child of md-tabs did not work.
Edit: another solution I thought about would be to manually load tab content based on which element is selected in the header area - I know how to do that - but then I'd lose the smooth transition animation between tabs.
I'd use a directive for that, since you have to include it into your every tab's content. It would simply do the trick.
Or you can use only md-tabs without placing every tab's content into md-tab. Make use of md-selected of md-tabs and activate your html node visibilities in the right way. In this case you can have something on the left, since you'll define the layout.

Is it possible to have class or ids on the grid drop down filter?

Can you have HTML ids or classes for the drop down filter/sort widget in extjs Grids?
What I mean is this component :
It's needed for test automation purposes. However we can probably live with it if its not possible, using some fancy CSS selectors instead.
Grid column menu can be quite tricky to test. The main problem that I see is that its html markup does not exist before you click on the column menu button (down arrow). When you click it the main menu with sort, columns and optionally filters is rendered (html markup is created), however, columns submenu html still does not exist. It is created when you move mouse over Columns item of main menu when the submenu is rendered and shown.
From that point on it exists for all columns because only one menu is use for all.
Thus, for testing, you would either need to simulate mouse clicks/moves or manually render the menu/submenu.
You can find out CSS classes involved (after the menu is rendered) by using developer tools to inspect the html markup.

Resources