-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect URL to individual image #131
Comments
Hi, thank u. What you are asking is something really application specific. However, your idea as an interesting point. Let me explain it a little bit. The first 3 points are really specific and you can achieve that using the image array of Image object and iterating using ngFor (no plain gallery or something else, only pure Angular). The only thing that you should use from this library is the Image object, because it's well structured to handle previews, descriptions and so on. However, to open the gallery with a specific id, you need the Image element (so if you use my Image object is better) and.... something that I don't have right now. For instance, a service (KsModalGalleryService) with a method to open the gallery passing an image object. In this way you'll be able to do this. Unfortunately, at the moment I don't have this service ready, I still have a partial implementation on a private local branch with many bugs (It's not so simple to implement it). I'll add it for sure in next 5.x.x releases, because required also to close this issue: #127 . So, I'm sorry but I cannot provide you an easy and quick solution, but I ask you to wait the release of this service. I hope to release it in April (probably before, but only as alpha/beta) as stable. PS: if you think that it's ok, I suggest to close this issue, since there is #127 with a more sophisticated use-case that also include the Modal Gallery Service. I promise that I'll try to release it ASAP. :) |
Hi, I was looking a bit more into code and examples, and I came across the AdvancedLayout that holds a modalOpenerByIndex parameter. I've tried experiment with it, i.e. by using number 1. I would expect to get the first picture to be opened by default, but it fails by saying: "Cannot read property '1' of undefined". I took care of the required model lifecycle and only used the ks-modal-gallery once the image array was build. If you have any additional input on how to use the AdvanedLayout, I might find a way out before the new release is coming. As I like to upgrade the app before April timelines, it would be nice to get it working. I'm anyways happy to observe #127 and work from there. My idea to implement this in the library would be:
With that, I could both use the layout capabilities of the library as well as the modal. |
modalOpenerByIndex is used only for specific use case related to plain gallery with advancedLayout. You cannot use it without a plain gallery. It's very limited to that particular scenario. The only way to open modal image without plain gallery is to build a dedicate injectable service to trigger the modal gallery to open itself to a specific index. For more info about advancedlayout I suggest to look official examples inside this repo. |
I've been evaluating #1237 and I'm afraid it's not going to provide what I need. I believe I'd need the following inputs on the ks-modal-gallery component:
I believe you have everything in place to make this possible, its more a matter of what you'd expose. The way I believe this will solve my use case is:
|
Exactly. Events are already available as
So to achieve this, you have to wait for #127 |
PS: If you want to test the service, I'll release public alpha/betas. Next week will be full fot me and so It will be very difficult to work on it. I want to release the first experimental release about 15 of April. |
…articular the feature isn't working for all modal gallyer of the example ((show) is required and I don't know why). Also, I have to add image id also to the 'add image' feature to navigate directly to the last image
…add' upper-button to navigate automatically at the end
update: I'll release a beta version of gallery.service in a couple of days. |
…articular the feature isn't working for all modal gallyer of the example ((show) is required and I don't know why). Also, I have to add image id also to the 'add image' feature to navigate directly to the last image
…add' upper-button to navigate automatically at the end
Good news man @tobi-or-not-tobi Finally after many commits it's time for the first beta release of gallery service. To try the beta: I'm still working on the new doc, so if you want to try please check to the official examples in this repo (folder /examples). Try to click on the new button at the beginning of the page in my examples to open images (specifying the id and the index of the image). PS: you must add an id to your modal-gallery as shown in my examples. Doc is coming soon. |
5.6.0 with gallery.service officially released. Feel free to re-open if you have problems. |
Images are scarred and not clear. <ks-modal-gallery [id]="5" [modalImages]="Images"
|
Are you using Image class in the right way? So modal for modal images and plain for thumbs (with obviously smaller images) |
1-Image are not clear (how to use fixed aspect full image ) plainGalleryGrid: PlainGalleryConfig = { |
You can use custom galleries to draw images with your custom css. What do you mean with |
consider you profile image: its clear and center , modal gallery am not getting image ,its not center , neither its clear, |
images are going flat |
please could you post a screenshot and the original image that you are using? |
In this case I suggest to use custom layout and add to images 'cover' as object-fit or as background. If you have specific requirements it's better to create the gallery with custom layout. However I'll schedule to check gridlayout in next releases to try to add object-fit: 'cover' as default, preventing that behaviour. |
ok, will try , thank u Stefano Cappa. Can I get an example of it. |
I don't understand where you want to add it. Please could you share a sketch with the right positioning? |
I'm sorry for the delay, I completely forgot to answer :(. What are you trying to do requires custom layout for sure. It's not possible to do this thing automatically, but it requires a custom implementation via pure css/html using custom layout. I suggest to take a look to the main example inside the repo here:
The same example should be also on stackblitz. As you can see I'm creating a gallery with custom + button and custom layout. You are free to do whatever you want, but for this kind of custom layouts, you need to write some css/html. |
hi Stefano Cappa, thank you for replying. Argument of type '{ width: string; height: string; margin: string; }' is not assignable to parameter of type 'Size'. |
Yes because margin in not part of the size interface. Can you post the full code? Because I don't undestand where you are using the size interface |
plainGalleryGrid: PlainGalleryConfig = { kindly give flexibility to change style. I need to add margin, flex-shrink: 0, etc |
|
As already explained above you have to use custom layout, not grid layout. To do custom things the only reasonable way is to write your css and you html and I give this possibility with the custom layout. |
I'm submitting a...
Current behavior
Great library, with great support for extensibility! Everything works OK.
Expected behavior
I would however like to open an image based on the URL. I used to do this with the imagePointer input, but this has changed a lot. I'm unsure if it is still feasible to open an image from the image set.
What I like to do:
Minimal reproduction of the problem with instructions
n/a
My official live example on StackBlitz (based on https://stackblitz.com/edit/angular-modal-gallery-v5) is:
n/a
What is the motivation / use case for changing the behavior?
Use this awesome library to allow for:
Environment (the most important section to fill very carefully)
The text was updated successfully, but these errors were encountered: