Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Added click and drag - #92

Open
arik123 wants to merge 13 commits into
masterfrom
development
Open

Added click and drag#92
arik123 wants to merge 13 commits into
masterfrom
development

Conversation

@arik123

@arik123 arik123 commented Nov 13, 2020

Copy link
Copy Markdown
Collaborator

Added the option to click and drag while selecting multiple items.
#91

@ZeusJunior

ZeusJunior commented Nov 16, 2020

Copy link
Copy Markdown
Owner

b17c551 Shouldn't have to use marketplace for effects, we have them local: 20d2cad

Clicking to select doesn't seem to work anymore, and clicking to deselect either reselects it instantly or has a small chance to actually unselect it

@ZeusJunior

Copy link
Copy Markdown
Owner

Clicking to select doesn't seem to work anymore, and clicking to deselect either reselects it instantly or has a small chance to actually unselect it

On the grid view, not list view. That works nicely

@arik123

arik123 commented Nov 16, 2020

Copy link
Copy Markdown
Collaborator Author

b17c551 Shouldn't have to use marketplace for effects, we have them local: 20d2cad

this is handled in 2c2fb37

@arik123

arik123 commented Nov 16, 2020

Copy link
Copy Markdown
Collaborator Author

Clicking to select doesn't seem to work anymore, and clicking to deselect either reselects it instantly or has a small chance to actually unselect it

I've also noticed it, but I'm not sure how to fix it. It seems to be a problem with mousedown event not firing or propagating properly.

@ZeusJunior

Copy link
Copy Markdown
Owner

That should have fixed it

@arik123

arik123 commented Nov 16, 2020

Copy link
Copy Markdown
Collaborator Author

d939f41 havent fixed it, now it does not select the first item you have clicked.
select

dependabot Bot and others added 4 commits January 5, 2021 20:46
Comment thread app/data.js
'Apotheosis',
'Ascension',
'Reindoonicorn Rancher',
// 'Reindoonicorn Rancher',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't commit commented code

Comment thread app/data.js
'5061;6': 'a89a8c', // Waterlogged Lab Coat
'5036;6': '7c6c57', // Ye Olde Rustic Colour
'5028;6': '424f3b' // Zepheniah's Greed
// A Color Similar to Slate

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you decide to open new lines? In practice this saves about 2 characters of horizontal space

Comment thread assets/css/index.css
visibility: visible;
}

#pricelist {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try not to target on an ID directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the problem with targeting ID ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://stackoverflow.com/questions/8084555/why-selecting-by-id-is-not-recommended-in-css You're basically cornering yourself in, and won't be able to override it later with another selector.

Comment thread assets/js/index.js
},
methods: {
mouseEntered: function (item, e) {
if (this.multiSelect.enabled && (e.buttons && e.buttons==1) && e.button == 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.buttons == 1 instead of e.buttons==1 , seems not to match your codestyle

  • try not to hook everything in brackets, a general preferance in JS is
if (!this.multiSelect.enabled || !(e.buttons && e.buttons==1) || e.button !== 0)
    return;

And that way save on horizontal space

Comment thread views/index.ejs
<div v-if="!list" class="d-flex mt-3 flex justify-content-center flex-wrap" id="pricelist">
<div class="item item-grid m-1" v-for="item in pricelistSorted" :key="item.sku" :style="{ backgroundImage: `url( ${item.style.image_small} ), url( ${item.style.effect} )`, backgroundColor: item.style.quality_color, borderStyle: item.style.craftable? false : 'dashed', opacity: item.enabled?1:0.5, borderColor: item.style.border_color}" @click="itemClick(item, $event)">
<div class="item item-grid m-1" v-for="item in pricelistSorted" :key="item.sku"
:style="{ backgroundImage: `url( ${item.style.image_small} ), url( ${item.style.effect} )`, backgroundColor: item.style.quality_color, borderStyle: item.style.craftable? false : 'dashed', opacity: item.enabled?1:0.5, borderColor: item.style.border_color}"

@poespas poespas Feb 23, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split the style-properties up on new lines

Comment thread views/index.ejs
<div class="item item-grid m-1" v-for="item in pricelistSorted" :key="item.sku" :style="{ backgroundImage: `url( ${item.style.image_small} ), url( ${item.style.effect} )`, backgroundColor: item.style.quality_color, borderStyle: item.style.craftable? false : 'dashed', opacity: item.enabled?1:0.5, borderColor: item.style.border_color}" @click="itemClick(item, $event)">
<div class="item item-grid m-1" v-for="item in pricelistSorted" :key="item.sku"
:style="{ backgroundImage: `url( ${item.style.image_small} ), url( ${item.style.effect} )`, backgroundColor: item.style.quality_color, borderStyle: item.style.craftable? false : 'dashed', opacity: item.enabled?1:0.5, borderColor: item.style.border_color}"
@click="itemClick(item, $event)" @mouseenter="mouseEntered(item, $event)">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either make the decision, in general HTML, to put attributes on all new lines, or put them all on the same line. this will avoid confusion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants