Skip to content

Commit

Permalink
Fixes to the colorpicker
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarneiro committed Feb 8, 2019
1 parent 68a9d18 commit b658104
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 12 deletions.
52 changes: 47 additions & 5 deletions css/interface.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,15 @@ header .title-holder p {
height: calc(100% - 27px);
overflow-y: auto;
overflow-x: hidden;
padding-top: 20px;
padding-bottom: 60px;
padding: 20px 15px 60px;
margin: 0 -15px;
}

/* ACCORDION */
.floor-panels-holder,
.floor-markers-holder {
position: relative;
padding-bottom: 40px;
overflow: hidden;
}

.add-floor-panel,
Expand Down Expand Up @@ -113,8 +112,6 @@ header .title-holder p {
display: block;
-webkit-user-select: none;
padding: 0 0 8px;
overflow-y: auto;
overflow-x: hidden;
margin: 0;
}

Expand Down Expand Up @@ -673,4 +670,49 @@ header .title-holder p {
width: 100%;
padding: 15px;
border-top: 1px solid #e3e9eb;
}

/* ACCORDIONS */
.panel.panel-default {
overflow: visible;
}

.panel-default>.panel-heading+.panel-collapse>.panel-body {
padding: 15px 10px;
}

/* COLOR PICKER */
.colorpicker-2x .colorpicker-saturation {
width: 235px;
height: 235px;
}

.colorpicker-2x .colorpicker-hue,
.colorpicker-2x .colorpicker-alpha {
width: 29px;
height: 235px;
}

.colorpicker-2x .colorpicker-preview,
.colorpicker-2x .colorpicker-preview div {
height: 30px;
font-size: 16px;
line-height: 160%;
}

.colorpicker-saturation .colorpicker-guide,
.colorpicker-saturation .colorpicker-guide i {
height: 10px;
width: 10px;
border-radius: 10px;
}

.colorpicker-right:before {
left: 15px;
right: auto;
}

.colorpicker-right:after {
left: 16px;
right: auto;
}
16 changes: 14 additions & 2 deletions dist/marker-panel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions js/interface/marker-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,20 @@ Fliplet.Floorplan.component('marker-panel', {
const $colorpickerElement = $('#list-item-color-' + $vm.id).parents('[colorpicker-component]')

$colorpickerElement.colorpicker({
container: false,
align: 'left'
container: true,
customClass: 'colorpicker-2x',
sliders: {
saturation: {
maxLeft: 235,
maxTop: 235
},
hue: {
maxTop: 235
},
alpha: {
maxTop: 235
}
}
})

$colorpickerElement.on('changeColor', (e) => {
Expand Down
11 changes: 10 additions & 1 deletion vendor/bootstrap-colorpicker.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b658104

Please sign in to comment.