overlay

best way to implement an overlay with pjax

[亡魂溺海] 提交于 2019-12-04 18:30:59
Currently I'm using pjax to load in a fragment and overlay the main page of my site page. I am then changing the body class with jquery to allow a few styling changes. This is fine but the browser back button doesn't work as it should due the body class change being triggered on click of the pjax trigger and therefor the body maintains the class of the overlay. The effect I'm looking for is quite similar to this site when you click on a project. http://www.watsonnyc.com/ Obviously this isn't working so there must be a better way of doing it. Here is an example of my code: $('.back').pjax('

jQuery UI overlay without dialog [duplicate]

陌路散爱 提交于 2019-12-04 18:01:59
Possible Duplicate: jQuery UI: How to use ui-widget-overlay by itself? I want to avoid the user to change the screen during ajax calls. So I was thinking to use jQuery UI overlay (the overlay of the modal dialogs) but without any dialog. I couldn't find any way to do this. Is there any way to show a modal without a dialog? Diego I take this answer of another SO question. Here there is a fiddle . And the code: $("body").append($.ui.dialog.overlay.create()) The dialog with the modal option set to true adds the following div, where width and height represent the viewable area in the browser

draw a rectangle on top of overlaid images

自古美人都是妖i 提交于 2019-12-04 17:47:00
I would like to overlay two images in MATLAB ( I and imagesc(data) ) and then draw a rectangle on top of those. I2 specifies the transparency pattern in the following code. The rectangle becomes a line on top of the image. Can anyone tell me why the rectangle is not drawn correctly? imshow(I); hold on; h = imagesc(data,[0,1]); hold off; I2 = ones(height,width) * 80; set(h, 'AlphaData', I2); rectangle('Position',[100,100,20,20]); Since we can't reproduce your code exactly without all the data, here is a complete example with sample images: %# some sample images I = imread('coins.png'); I_transp

how to draw rectange on camera preview in android

余生长醉 提交于 2019-12-04 17:18:43
Actually I don't understand how to implement the rectangle on the camera preview. Everything working well, but I don't know the way to put the rectangle border like this link . Please anyone help me. Thanks. I suggest you implement your camera preview in a custom SurfaceView and then in your XML you can simply overlay the rectangle, like the accepted answer here: Android: Overlay on Android Camera Preview So add a Java file to your project: public class CapturePreview extends SurfaceView implements SurfaceHolder.Callback{ public static Bitmap mBitmap; SurfaceHolder holder; static Camera

overlay images in java

吃可爱长大的小学妹 提交于 2019-12-04 17:11:01
I hope you can give me some advices to solve my problem. I need to overlay many images on a button.but the problem is, this is the base image (tooth): (http://i.imgur.com/7tIcP.gif) my first image is this: http://i.imgur.com/FYuD8.gif and then I put this: http://i.imgur.com/mWz9c.gif the first image overlaps the second so I just can see only the second image... maybe you will tell me that one option is change the order of the image before overlay, but the user will select what will be the first, maybe just want the first image, but in other cases user will put the first AND then the second or

Overlay two bitmap images in WPF

二次信任 提交于 2019-12-04 16:42:11
I need to overlay two images (say, JPEG and PNG with transparency). Input: - JPEG image - PNG image Output: - JPEG image with PNG applied. What is the best approach to do that? Thank you in advance for the replies and hints! Cheers You can use a DrawingGroup like this: var group = new DrawingGroup(); group.Children.Add(new ImageDrawing(new BitmapImage(new Uri(@"...\Some.jpg", UriKind.Absolute)), new Rect(0, 0, ??, ??))); group.Children.Add(new ImageDrawing(new BitmapImage(new Uri(@"...\Some.png", UriKind.Absolute)), new Rect(0, 0, ??, ??))); MyImage.Source = new DrawingImage(group); 来源: https:

Oreo (API 26) - drawOverlay + draw over status bar

ぃ、小莉子 提交于 2019-12-04 16:25:47
问题 In android oreo, I can't use WindowManager.LayoutParams.TYPE_SYSTEM_ERROR anymore and must use WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY instead. The drawback is, that this mode does not draw over the statusbar. Is there anyway to achieve the old behaviour and be able to draw over the statusbar as well? I've a sidebar app and until now, I allowed the user to have trigger areas on top of the screen as well, which does not work anymore now, because the status bar is overlapping the

How to subview a camera view?

前提是你 提交于 2019-12-04 16:03:41
问题 I am making an app that will let the user see themselves in a 'mirror' (the front facing camera on the device). I know of multiple ways of making a UIImageViewController with a view overlay, but I want my app to have it be the opposite way. In my app, I want the camera view to be a subview of the main view, without the shutter animation or the ability to capture photos or take videos and without it being full screen. Any ideas? 回答1: The best way to accomplish this is to not use the built-in

Overlay.draw() calls many times

笑着哭i 提交于 2019-12-04 14:56:16
I have a question regarding the draw() method of the Overlay class in Android Maps. When I move map, method draw() get called a few times (from 4 to 13). It's a problem for me, because this method must repaint my route with 70000+ points, and this is a lot resources. I can't find description for this problem, but when I use code examples from any sources, I have same problem. This is the normal behaviour. When you move the map, you expect it to move smoothly and to achive that any map movement is slipt in smaller movement steps. For the sake of consitency, the draw() method on the overlay is

How to best overlay a canvas on an image?

北战南征 提交于 2019-12-04 14:18:09
I would like to place a canvas on top of an image that I have on a page. The canvas will be the exact dimensions of the image. However, the following conditions must be met: The canvas must remain exactly on top of the image at all times. Therefore, using absolute positioning will not work because if content is inserted above the image, it will move the image down without moving the canvas . The image may be resized from its original size. Therefore, replacing the image with the canvas and setting its background to the image will not work. What options do I have? You should be able to use