Giter VIP home page Giter VIP logo

foundry-vtt-layers-panel's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

foundry-vtt-layers-panel's Issues

Z-Level folders collapse when selecting something

Z-Level folders collapse when selecting something

When you select a new object, all z-level folders will collapse and 'close'.

From what I remember, I didn't isolate the area of logic that stores whether a folder is collapsed or not from the existing sidebar collapse status. Meaning whenever the panel re-renders, it reverts folders to their default state and collapses everything, as the state hasn't been stored properly.

I'll have to look into handling storing that data within the module properly.

Add a toolbar, to indicate what property the arrow-keys adjust

Add a toolbar, to indicate what property the arrow-keys adjust

Currently there's the awkward 'quick-edit' area at the bottom of the layers-panel.

It's fairly unintuitive how you can quickly adjust values by selecting one of the fields in that quick-edit area and then use the arrow-keys. And it's not exactly a very smooth workflow as the fields aren't auto-selected when you select a new object.

A better way of handling this could perhaps be to have a small tool-selection bar in the layers-panel, so that when a tool is selected, the arrow keys will then adjust the appropriate property of the selected objects.

Suggested tools:

  • Move
  • Rotate
  • Resize
  • Z-Index
  • Opacity

Switch rendering order not working

As far as I can tell the 'Switch rendering order of drawings and tiles' option doesn't do anything in 8.6.

No matter what any non-overhead tiles are placed under drawings

Layout/Styling of the panel is messed up in 0.8.x

Layout/Styling of the panel is messed up in 0.8.x

The layout of the actual layers-panel appears to be fairly borked in 0.8.x.

I assume it's due to some shuffling around of the base FoundryVTT stylesheet that I was presumably relying on.

Screenshot
Bugged Layout Screenshot

Drag-and-Drop functionality for adjusting an object's z-index

Drag-and-Drop functionality for adjusting an object's z-index

It'd be nice to be able to drag-and-drop a drawing's entry in the panel into a z-index folder to adjust its z-index value without having to go into the drawing configuration sheet.

I don't know if it's feasible to adjust the rendering order within a specific z-index, as I'm not exactly sure how the order is decided in the first place. I assume it's just to do with what order objects have been added to the drawing objects array, so it might be feasible if a bit awkward to implement.

Add module-settings entry for adjusting various options

Add module-settings entry for adjusting various options

I need to add a module-settings entry to the built-in options for adjusting various options.

Potential options:

  • Add enable/disable for newly added tools and their buttons
  • Enable/disable default 'Clear All Drawings' button
  • What properties to add in the quick-edit box (e.g. position, size, rotation etc.)

Proper shift+click group selection functionality

Proper shift+click group selection functionality

Currently only have CTRL + Click selection for selecting multiple entities one-by-one.

It'd be nice to be able to SHIFT + Click for selecting a group from start-to-finish, as is standard UI functionality in most programs.

Object naming functionality

Object naming functionality

Currently I don't think the drawing object has a native name property that it uses anywhere.

The name that is shown by the panel is either just the ID of the object, which is an unreadable mess and isn't very useful, or I've added some basic dynamic name generation if there was something useful to get one from, like in the case of images file names.

It'd be useful if people could rename drawing objects, so they could be given useful display names in the panel.

This also goes for z-index folder names, so people could have a 'background' layer folder, 'walls' layer folder etc. Although this would require the z-index folders not being dynamically generated like they currently are, and actually storing the folders somewhere with their names etc.

Disable object selection on canvas if the object is locked

Disable object selection on canvas if the object is locked

Currently it becomes a nightmare to select layers on the canvas if you've needed to add things on top of other things.

Making it so that locked objects aren't left-click selectable is likely the easiest way of somewhat improving the workflow of selecting objects on the canvas.

Ideally the selection process could be improved by taking object's transparency into account, so clicking transparent areas of an image wouldn't select it, but messing around with that sounds like it'd cause all sorts of performance issues if it wasn't handled correctly.

Module enabled in setup but not appearing in-game

Module enabled in setup but not appearing in-game

It appears a few of my modules aren't appearing in-game when they're enabled in the base FoundryVTT setup area.

From some quick messing around, it appears it's likely some sort of issue with the way I've setup the module.json file.

Cleaning the module.json file by removing some of the empty entries I left in appears to clear it up.

Quick-Edit bar functionality (for moving, rotating etc.)

Quick-Edit bar functionality (for moving, rotating etc.)

Although currently you can select a specific object on the canvas with the panel, you still can't click+drag to move it if it's behind something, because your click will just select the top entity again.

Easy workaround without having to mess with the actual canvas stuff is to implement a little footer-bar (or something similar) that has some of the most commonly adjusted settings available for quickly editing, like an object's position, rotation, z-index etc.

Allow right-click canvas panning when over a selected object

Allow right-click canvas panning when over a selected object

By default FoundryVTT doesn't allow you to right-click pan around the canvas if you're right-clicking over a selected object.

I assume this is due to something like the right-click 'context-menu' event overriding the right-click 'drag' event.

Filter by Type functionality

Filter by Type functionality

It'd be nice to be able to filter drawings by their type, by adding a filter-selection box at the top.

Alternatively perhaps somehow have it in-built to the search-box by implementing fuzzy-search functionality?

Although that would perhaps require a bunch of extra documentation, and isn't very intuitive.

Use new canvas layer instead of drawings layer

Use new canvas layer instead of drawings layer

Currently this module just adds additional tools for building battle-maps using the existing canvas drawings-layer.

But there's a few annoyances with using the existing drawings-layer, like the tiles layer being rendered beneath it, so if someone wants to just add a tile it won't work if you build a battle-map using the drawings-layer. And there being the danger of the 'Clear Drawings' tool button destroying all of someone's work.

It might be beneficial to make a duplicate of the drawings-layer class and locating it underneath the existing drawings-layer so that there are fewer issues in the future. Although this may mean that if the module breaks for any reason in the future, that people will be unable to access their battle-maps properly.

I'll have to look into if it's possible to somehow have stuff drawn by the drawings-layer by default, but if the module correctly loads then intercept and render those bits onto some sort of new battle-map layer instead.

Object preview functionality

Object preview functionality

It'd be nice to have object preview functionality in the way Photoshop has a little preview thumbnail of each layer.

Actually previewing each object might be a bit of a nightmare, but basic things that could be done:

  • Solids (rectangles, ellipses, polygons)
    • Colour the icon based on the objects colour?
  • Text
    • Same as above, colour 'T' icon based on colour?
  • Image
    • Display small preview of the image, although this might be a bit resource intensive.

When the panel refreshes, it resets scroll-position (e.g. when selecting an object)

Panel refreshes reset the scroll-position (e.g. when selecting an object)

Issue

When the panel refreshes (e.g. when you select an object), the panel scrolls to the top.

Discussion

I assume this is caused by the directory-list being completely re-rendered when the render() is called, and so for a split-second there'll be an empty panel and it'll scroll to the top.

Instead of completely re-rendering the panel on selection change, it'd make more sense to just adjust the 'selected' class on each list item. Although this won't fix it for all changes, it's the most common change that causes the re-rendering.

Drag-and-Drop images from file-browser like tiles

Drag-and-Drop images from file-browser like tiles

It'd be nice to have a file-browser that allows drag-and-drop functionality like the tiles layer/tools area.

Hopefully it's just a case of copying and modifying the class from the tiles canvas layer without a huge hassle.

Drag-n-drop file browser 'asset grid size' option does nothing

Drag-n-drop file browser 'asset grid size' option does nothing

The option labelled 'Asset Grid Size' in the module added drag-n-drop file-browser does nothing.

It's supposed to adjust the scale of the tile so that it fits grids of differing sizes, but the drawing object class doesn't work in the same way as the normal tiles which can easily be scaled, presumably since background images will be tiled.

I'll have to look into if there is an inbuilt scaling property that I can apply to drawing class objects.

Either that or just remove the option from the module-added menu if that's not the case.

Add support for other layers/object types

Add support for tiles, tokens, lights, audio sources, and templates.
Once other issues are resolved, most notably issue #2 , being able to quickly select, edit, and delete these other types of objects will be useful. Really, in many cases, just being able to get a list of the objects can be handy.
At the very least, the tiles layer would be - in my opinion - a more useful layer for this tool than the drawing layer in any case.
Whether this should just be a filter in a single list, separate tabs in the same dialog (which would make accessing it via the drawing panel a little confusing), or a separate dialog (and activation button) for each type is up to you, though I'm partial to reducing clutter by implementing one of the first two rather than the third.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.