Skip to content
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

ImageViewer doesn't work on relative paths #498

Closed
lapsio opened this issue Oct 2, 2016 · 5 comments
Closed

ImageViewer doesn't work on relative paths #498

lapsio opened this issue Oct 2, 2016 · 5 comments

Comments

@lapsio
Copy link

lapsio commented Oct 2, 2016

I'm trying to make portable tagSpaces bundle but it doesn't seem to work with relative paths really well. I've set directory to "../data" and file browser works correctly but images don't open in embeded viewer. There's 404 error. I think it's due to opening images in iframe which has relative location to tagSpaces itself thus instead of ../data it should actually load ../../../data in ImageViewer

@lapsio
Copy link
Author

lapsio commented Oct 2, 2016

also protip - there's flexbox. And if ur 2 lazy 4 that then still

#imageContent {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
    object-fit: contain;
    position:absolute;
    top:50%;
    transform:translate(0,-50%);
}

because images aligned to top look pretty disgusting

and tbh just noticed they're also not centered horizontally

@uggrock
Copy link
Member

uggrock commented Oct 2, 2016

The top alignment has somethink to do with the zoom. It is clear that we can have a better image viewer, but our focus is currently more on the core of the application. We are open for pull request in https://github.com/tagspaces/viewerImage/

@uggrock
Copy link
Member

uggrock commented Oct 2, 2016

Regarding the path issue, this only happens if you have selected a relative path as a location path. We will try to find a solution for this case, because the image viewer is not the only affected extension.

@lapsio
Copy link
Author

lapsio commented Oct 2, 2016

is there any way to make it portable without using relative paths?

To make it more clear we're planning to use modified version of TagSpace for our small team repository assets tagging (because we keep loosing track on files we have in team, they get lost in ton of directories). The modified version is using alternative tag storage backend (json index instead of filenames because we can't use filename based tagging in our case). We also have modified viewer plugin to work with relative paths and this image align xD. But in order to have everything in sync we'd like to bundle this modified TagSpace with repo. But everyone clones it to different location locally so paths need to be relative i think.

Once it'll be a bit more stable and usable i think I'll post indexer module here so maybe you'd be able to use it in more civilized way than our dirty code edits to provide alternative tags storage engine.

Just one more thing as I don't want any unpleasant troubles - I quickly scrolled through license but I'm not really good at legal stuff so I'd prefer to be double sure - is it legal to "bundle" modified TagSpaces with our repo? All the stuff is bundled as is so it contains all those LICENSE files and stuff. If there's anything else necessary in order to make it "right" than we're absolutely able to put some info anywhere it's necessary. Our project is non-commercial, FOSS if it matters.

If you can think of better way to make such setup convenient please let me know.

@uggrock
Copy link
Member

uggrock commented Jan 5, 2017

the image viewer is meanwile reimplemented with the help of the viewer.js library, so now the described issue is fixed. Opening of images with relative paths will be supported in the next release, so I will close this issue for now.

@uggrock uggrock closed this as completed Jan 5, 2017
uggrock added a commit that referenced this issue Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants