Center div is not centered in Owl Carousel when the center div is enlarged - image

I have used this solution to enlarge a div in the center of the owl carousel:
How do I add classes to items in Owl Carousel 2?
However if I set the width of the 'big' class , it stretches right and does not center in the carousel.
Setting the height is fine, but setting the width causes me heartache. Any suggestions would be much appreciated.
PS: Ive also tried transform:scale(1.3) on the big class, but I ended up getting an overlap. I then tried setting the margins on the big class (left and right), but this created unequal lengths to the 'item' class.
How do I add classes to items in Owl Carousel 2?

Related

JavaFx image resizing

I have a borderPane with a menu top,a grid left and an image in the center.I want the image to have the same size as the center of the border because now the image goes over my grid.
I tried this:
imageView.fitWidthProperty().bind(box.widthProperty());
where imageView is the name for my image and box is the BorderPane object.Thank you.
See JavaFX Feature Request RT-21337 Add ImageViewPane and MediaViewPane controls which contains a code attachment for a sample ImageViewPane implementation which which will resize the ImageView it contains to the area available to the region. To get the behaviour required you might also need to implement computeMinWidth and computeMinHeight on the ImageViewPane so that they return zero rather than the minimum size of the Image.
now the image goes over my grid
This is because the minimum size of your image is currently larger than the available space of the center of your BorderPane:
BorderPane does not clip its content by default, so it is possible that childrens' bounds may extend outside its own bounds if a child's min size prevents it from being fit within it space.
Some potential alternatives to prevent the center content overflowing the border:
Manually set a clip on the center node to prevent it overflowing the borders.
Dynamically resize the ImageView as in the ImageViewPane sample linked above.
Place the ImageView in a ScrollPane.
Use the css -fx-background-image attributes to display and dynamcially resize your image rather than using an ImageView.
Set the center of the borderpane first before setting the border content, that way it will be rendered underneath the border content.
Use a different construct from a borderpane (e.g. a HBoxes, VBoxes, etc.) which don't overlap their nodes when the nodes are larger than the available display area.
I tried this: imageView.fitWidthProperty().bind(box.widthProperty());
My guess from the code provided is that this didn't work because the enclosing box of the image is a dynamically resizable pane of some sort, so the minimum width of the box is being determined by the width of the image and not vice versa.

How to get div X and Y (top left and bot right) , inside an image

Here is what exactly I am trying to do.
I have an image with square elements inside it. When i click on top left and bottom right corners of those elements they are surrounded with divs with border. I then have functions to drag and resize those divs(once they are created by two clicks). I want to be able to record the resized coordinates of those divs in text boxes. For example if the image is with height=700 and width=500. Then if i create a square div inside it with coordinates top left(x=190,y=150) and bottom right(x=290,y=250). Then if i drag this div around the image i want those coordinates to change accordingly. Same thing to happen if i resize it.
Here i have added the code in a web site. laughter.free.bg/imagemapping/Img1.html What you need to do is click on top left and bottom right corners of one of the snack packs. Then you`ll see a box on the right with the coordinates of this Green bordered div. I want those coordinates to change when i drag or resize this div. You can see the code in the source of the page.
Thanks a lot in advance.
It is possible to bind functions to the resize event through jQuery.
For example, ur kiroid has a class of ui-resizable. You could use something like:
$('.ui-resizable').resize(function() {
// refresh your coords here from $('kiroid').css maby?
})

Irregular layout in wp7 what can i do?

See this Chart
rules:
car1 car2
car3 car4
If news has image then use car1 and car3 layout ;not image ,use car2 or car3 layout. If news has large image then it height equal car1 height + car3 height or car2 height+car4 height
My question: how use listbox dispose the Irregular layout in WP7 ?
There is no straight forward answer to your problem. Shortly, you cannot do it readily. That is there is no "irregular" layout manager with the standard libraries (e.g. something like Grid or Stackpanel). Perhaps there is 3rd party library out there but i am not aware. If there is nothing out of the box, you have 2 options:
Make each listbox item a 2x2 grid and then have some logic behind for hiding content of a cell when an adjescent cell grows its rowspan to 2. Vice versa when a big tile becomes a smaller one then you have to change the rowspan and make the hidden tile visible again. I am taking about collapsing or making visible here as an effect. But, you could of course remove the tile and append it to the end of the list. There are many options on how you want your list to behave.
You could consider using a WrapPanel (from silverlight toolkit) inside a scrollviewer to achieve a similar effect. Again, you would have to do some work here as well for reorganizing the container.

changing the color of the button in selectfield/datepicker/timepicker in Sencha

Is it possible to change the color of the button (the little triangle button) shown in the right side of selectfield/datepicker/timepicker?
those little triangles are constructed using images as background so you need to change those images to change color of those triangles
for datepicker image is "resources/themes/images/default/form/date-trigger.gif" in css class .x-form-date-trigger
for timepicker/selectfield image is "resources/themes/images/default/form/trigger.gif" in css class .x-form-trigger

BlackBerry layout: HorizontalFieldMahager with 3 items (Including an EditField)

I'm having a hard time working with the BlackBerry UI API.
What I want to do is creating a "list item" based on a HorizontalFieldManager that consists of the following childFields:
An optional BitmapField (Horizontal-Left, Vertical-Center)
A LabelField (Horizontal-left, Vertical-Center)
A rounded rectangle that contains an single line EditField. The rounded rectangle has a fixed width and height, so the EditField should scroll horizontally inside the rounded rectangle when the text becomes wider than the rounded-rectangle's width.
I've added a image illustrating the desired situation below:
Can someone help me with this?
Thanks in advance!

Resources