Skip to content

feat($compile): adds labelOverlapSeparator as an option #616

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

Merged
merged 3 commits into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ The default options are:
reversedControls: false,
boundPointerLabels: true,
mergeRangeLabelsIfSame: false,
labelOverlapSeparator: ' - ',
customTemplateScope: null,
logScale: false,
customValueToPosition: null,
Expand Down Expand Up @@ -413,6 +414,8 @@ Just pass an array with each slider value and that's it; the floor, ceil and ste

**mergeRangeLabelsIfSame** - _Boolean (defaults to false)_: Set to true to merge the range labels if they are the same. For instance, if min and max are 50, the label will be "50 - 50" if `mergeRangeLabelsIfSame: false`, else "50".

**labelOverlapSeparator** - _String (defaults to ' - ')_: Separator to use when the labels overlap. For instance, if min and max are -1 and 1, the label will be "-1 .. 1" if `labelOverlapSeparator: ' .. '`.

**onStart** - _Function(sliderId, modelValue, highValue, pointerType)_: Function to be called when a slider update is started. If an id was set in the options, then it's passed to this callback. This callback is called before any update on the model. `pointerType` is either 'min' or 'max' depending on which handle is used.

**onChange** - _Function(sliderId, modelValue, highValue, pointerType)_: Function to be called when rz-slider-model or rz-slider-high change. If an id was set in the options, then it's passed to this callback. `pointerType` is either 'min' or 'max' depending on which handle is used.
Expand Down
6 changes: 3 additions & 3 deletions dist/rzslider.css

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions dist/rzslider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! angularjs-slider - v6.4.3 -
/*! angularjs-slider - v6.4.4 -
(c) Rafal Zajac <[email protected]>, Valentin Hervieu <[email protected]>, Jussi Saarivirta <[email protected]>, Angelin Sirbu <[email protected]> -
https://github.com/angular-slider/angularjs-slider -
2018-01-22 */
2018-02-06 */
/*jslint unparam: true */
/*global angular: false, console: false, define, module */
;(function(root, factory) {
Expand Down Expand Up @@ -78,6 +78,7 @@
reversedControls: false,
boundPointerLabels: true,
mergeRangeLabelsIfSame: false,
labelOverlapSeparator: ' - ',
customTemplateScope: null,
logScale: false,
customValueToPosition: null,
Expand Down Expand Up @@ -1473,8 +1474,8 @@
labelVal = lowTr
} else {
labelVal = this.options.rightToLeft
? highTr + ' - ' + lowTr
: lowTr + ' - ' + highTr
? highTr + this.options.labelOverlapSeparator + lowTr
: lowTr + this.options.labelOverlapSeparator + highTr
}

this.translateFn(labelVal, this.cmbLab, 'cmb', false)
Expand Down
2 changes: 1 addition & 1 deletion dist/rzslider.min.css

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

6 changes: 3 additions & 3 deletions dist/rzslider.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/rzslider.scss

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'commit' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precommit', 'commit', 'postcommit' ]
5 info lifecycle [email protected]~precommit: [email protected]
6 verbose lifecycle [email protected]~precommit: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]~precommit: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\dev\forks\angularjs-slider\node_modules\.bin;C:\Users\user\.gvm\vertx\current\bin;C:\Users\user\.gvm\springboot\current\bin;C:\Users\user\.gvm\lazybones\current\bin;C:\Users\user\.gvm\jbake\current\bin;C:\Users\user\.gvm\groovyserv\current\bin;C:\Users\user\.gvm\groovy\current\bin;C:\Users\user\.gvm\griffon\current\bin;C:\Users\user\.gvm\grails\current\bin;C:\Users\user\.gvm\gradle\current\bin;C:\Users\user\.gvm\glide\current\bin;C:\Users\user\.gvm\gaiden\current\bin;C:\Users\user\.gvm\crash\current\bin;C:\Users\user\.gvm\asciidoctorj\current\bin;C:\Users\user\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\user\bin;C:\Program Files (x86)\Python 3.5\Scripts;C:\Program Files (x86)\Python 3.5;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Java\jdk1.8.0_25\jre\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\dev\libs\maven\apache-maven-3.0.5\bin;C:\wamp\bin\php\php5.4.12;C:\Program Files\Mercurial;F:\soft\SQLite\sqlite-shell-win32-x86-3071700;C:\Program Files (x86)\Windows Live\Shared;C:\Users\user\AppData\Roaming\npm;C:\Ruby193\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Graphviz2.38\bin;F:\soft\Apache\Ant\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin;C:\wamp\bin\mysql\mysql5.6.12\bin;F:\soft\gradle\gradle-2.2.1\bin;C:\Program Files (x86)\KDiff3;C:\cygwin64;F:\soft\PUtty;F:\soft\ffmpeg\latest\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\lib;C:\Users\user\AppData\Local\Android\sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_25\bin;C:\Users\user\AppData\Local\Android\sdk\build-tools\25.0.2;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Turbo\Cmd;C:\Program Files (x86)\Python 3.5\Scripts;C:\Program Files (x86)\Python 3.5;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Java\jdk1.8.0_25\jre\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\dev\libs\maven\apache-maven-3.0.5\bin;C:\wamp\bin\php\php5.4.12;C:\Program Files\Mercurial;F:\soft\SQLite\sqlite-shell-win32-x86-3071700;C:\Program Files (x86)\Windows Live\Shared;C:\Users\user\AppData\Roaming\npm;C:\Ruby193\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Graphviz2.38\bin;F:\soft\Apache\Ant\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin;C:\wamp\bin\mysql\mysql5.6.12\bin;F:\soft\gradle\gradle-2.2.1\bin;C:\Program Files (x86)\KDiff3;C:\cygwin64;F:\soft\PUtty;F:\soft\ffmpeg\latest\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\lib;C:\Users\user\AppData\Local\Android\sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_25\bin;C:\Users\user\AppData\Local\Android\sdk\build-tools\25.0.2;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Turbo\Cmd;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Spoon\Cmd;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Users\user\AppData\Local\Yarn\.bin;C:\Program Files\MongoDB\Server\3.4\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin;.;.;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl;.;
8 verbose lifecycle [email protected]~precommit: CWD: C:\dev\forks\angularjs-slider
9 silly lifecycle [email protected]~precommit: Args: [ '/d /s /c', 'lint-staged' ]
10 silly lifecycle [email protected]~precommit: Returned: code: 0 signal: null
11 info lifecycle [email protected]~commit: [email protected]
12 verbose lifecycle [email protected]~commit: unsafe-perm in lifecycle true
13 verbose lifecycle [email protected]~commit: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\dev\forks\angularjs-slider\node_modules\.bin;C:\Users\user\.gvm\vertx\current\bin;C:\Users\user\.gvm\springboot\current\bin;C:\Users\user\.gvm\lazybones\current\bin;C:\Users\user\.gvm\jbake\current\bin;C:\Users\user\.gvm\groovyserv\current\bin;C:\Users\user\.gvm\groovy\current\bin;C:\Users\user\.gvm\griffon\current\bin;C:\Users\user\.gvm\grails\current\bin;C:\Users\user\.gvm\gradle\current\bin;C:\Users\user\.gvm\glide\current\bin;C:\Users\user\.gvm\gaiden\current\bin;C:\Users\user\.gvm\crash\current\bin;C:\Users\user\.gvm\asciidoctorj\current\bin;C:\Users\user\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\user\bin;C:\Program Files (x86)\Python 3.5\Scripts;C:\Program Files (x86)\Python 3.5;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Java\jdk1.8.0_25\jre\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\dev\libs\maven\apache-maven-3.0.5\bin;C:\wamp\bin\php\php5.4.12;C:\Program Files\Mercurial;F:\soft\SQLite\sqlite-shell-win32-x86-3071700;C:\Program Files (x86)\Windows Live\Shared;C:\Users\user\AppData\Roaming\npm;C:\Ruby193\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Graphviz2.38\bin;F:\soft\Apache\Ant\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin;C:\wamp\bin\mysql\mysql5.6.12\bin;F:\soft\gradle\gradle-2.2.1\bin;C:\Program Files (x86)\KDiff3;C:\cygwin64;F:\soft\PUtty;F:\soft\ffmpeg\latest\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\lib;C:\Users\user\AppData\Local\Android\sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_25\bin;C:\Users\user\AppData\Local\Android\sdk\build-tools\25.0.2;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Turbo\Cmd;C:\Program Files (x86)\Python 3.5\Scripts;C:\Program Files (x86)\Python 3.5;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Java\jdk1.8.0_25\jre\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\dev\libs\maven\apache-maven-3.0.5\bin;C:\wamp\bin\php\php5.4.12;C:\Program Files\Mercurial;F:\soft\SQLite\sqlite-shell-win32-x86-3071700;C:\Program Files (x86)\Windows Live\Shared;C:\Users\user\AppData\Roaming\npm;C:\Ruby193\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Graphviz2.38\bin;F:\soft\Apache\Ant\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin;C:\wamp\bin\mysql\mysql5.6.12\bin;F:\soft\gradle\gradle-2.2.1\bin;C:\Program Files (x86)\KDiff3;C:\cygwin64;F:\soft\PUtty;F:\soft\ffmpeg\latest\bin;C:\Program Files\Git\usr\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\bin;C:\Program Files\OpenLink Software\VOS7\virtuoso-opensource\lib;C:\Users\user\AppData\Local\Android\sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_25\bin;C:\Users\user\AppData\Local\Android\sdk\build-tools\25.0.2;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Turbo\Cmd;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Spoon\Cmd;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Users\user\AppData\Local\Yarn\.bin;C:\Program Files\MongoDB\Server\3.4\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin;.;.;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl;.;
14 verbose lifecycle [email protected]~commit: CWD: C:\dev\forks\angularjs-slider
15 silly lifecycle [email protected]~commit: Args: [ '/d /s /c', 'git-cz' ]
16 silly lifecycle [email protected]~commit: Returned: code: 1 signal: null
17 info lifecycle [email protected]~commit: Failed to exec commit script
18 verbose stack Error: [email protected] commit: `git-cz`
18 verbose stack Exit status 1
18 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
18 verbose stack at emitTwo (events.js:106:13)
18 verbose stack at EventEmitter.emit (events.js:191:7)
18 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
18 verbose stack at emitTwo (events.js:106:13)
18 verbose stack at ChildProcess.emit (events.js:191:7)
18 verbose stack at maybeClose (internal/child_process.js:877:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
19 verbose pkgid [email protected]
20 verbose cwd C:\dev\forks\angularjs-slider
21 error Windows_NT 6.1.7601
22 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "commit"
23 error node v6.10.0
24 error npm v3.10.10
25 error code ELIFECYCLE
26 error [email protected] commit: `git-cz`
26 error Exit status 1
27 error Failed at the [email protected] commit script 'git-cz'.
27 error Make sure you have the latest version of node.js and npm installed.
27 error If you do, this is most likely a problem with the angularjs-slider package,
27 error not with npm itself.
27 error Tell the author that this fails on your system:
27 error git-cz
27 error You can get information on how to open an issue for this project with:
27 error npm bugs angularjs-slider
27 error Or if that isn't available, you can get their info via:
27 error npm owner ls angularjs-slider
27 error There is likely additional logging output above.
28 verbose exit [ 1, true ]
5 changes: 3 additions & 2 deletions src/rzslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
reversedControls: false,
boundPointerLabels: true,
mergeRangeLabelsIfSame: false,
labelOverlapSeparator: ' - ',
customTemplateScope: null,
logScale: false,
customValueToPosition: null,
Expand Down Expand Up @@ -1477,8 +1478,8 @@
labelVal = lowTr
} else {
labelVal = this.options.rightToLeft
? highTr + ' - ' + lowTr
: lowTr + ' - ' + highTr
? highTr + this.options.labelOverlapSeparator + lowTr
: lowTr + this.options.labelOverlapSeparator + highTr
}

this.translateFn(labelVal, this.cmbLab, 'cmb', false)
Expand Down
Loading