yard-sketchup 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 864c6e1cf6b0d21040f02d259e79e4e406f7dbab2cb1dbcacb5849453ac72e8c
|
|
4
|
+
data.tar.gz: dc42417550ac3f07f11917b9ed5ce89361ea13d9b53faa7f514d9551fba287eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e37d7c692440fedcfd7fbc32eefe67347e599975e418c47749cfec5a7b4ba1999d82db3936552c7f62d6e31a4bedc4847405e3c40a5d2d48d36272523c54a0b6
|
|
7
|
+
data.tar.gz: 9e303837c122679b55b3a0d1a04588bc298de9307aea4bddd6d04c677b82ddbb202078fa09d8e977bb869c08a26535f0c3e142d0706eb2309164fb13de42a2d2
|
|
@@ -29,9 +29,45 @@ function persistentToggles() {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
// YARD only listens for "input" and "change" on the search box, so pressing
|
|
33
|
+
// Enter does nothing. Open the first match instead. YARD searches in chunks, so
|
|
34
|
+
// while the "insearch" class is still on #full_list the match list may be
|
|
35
|
+
// incomplete; wait briefly for it to finish before choosing the first row.
|
|
36
|
+
function openFirstResultOnEnter() {
|
|
37
|
+
var input = document.querySelector('#search input');
|
|
38
|
+
if (!input) return;
|
|
39
|
+
|
|
40
|
+
function openFirstMatch(attemptsLeft) {
|
|
41
|
+
var list = document.getElementById('full_list');
|
|
42
|
+
var searching = list && list.classList.contains('insearch') &&
|
|
43
|
+
document.getElementById('content').classList.contains('insearch');
|
|
44
|
+
if (searching) {
|
|
45
|
+
// Still searching when the retry budget runs out: the found rows may
|
|
46
|
+
// belong to a previous query, so don't navigate.
|
|
47
|
+
if (attemptsLeft <= 0) return;
|
|
48
|
+
var query = input.value;
|
|
49
|
+
setTimeout(function() {
|
|
50
|
+
// Abandon the retry if the query changed since Enter was pressed.
|
|
51
|
+
if (input.value === query) openFirstMatch(attemptsLeft - 1);
|
|
52
|
+
}, 50);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
// YARD marks the .item row (not the <li>) with the "found" class.
|
|
56
|
+
var link = document.querySelector('#full_list .item.found .object_link a');
|
|
57
|
+
if (link) link.click();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
input.addEventListener('keydown', function(evt) {
|
|
61
|
+
if (evt.key !== 'Enter' || evt.isComposing || input.value === '') return;
|
|
62
|
+
evt.preventDefault();
|
|
63
|
+
openFirstMatch(40);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
32
67
|
$(document).ready(function() {
|
|
33
68
|
console.log('READY: sketchup.js');
|
|
34
69
|
persistentToggles();
|
|
70
|
+
openFirstResultOnEnter();
|
|
35
71
|
});
|
|
36
72
|
|
|
37
73
|
})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module SketchUpYARD
|
|
2
|
-
VERSION = '1.6.
|
|
3
|
-
end
|
|
1
|
+
module SketchUpYARD
|
|
2
|
+
VERSION = '1.6.2'.freeze
|
|
3
|
+
end
|
data/yard-sketchup.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yard-sketchup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Trimble Inc, SketchUp Team
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.9.
|
|
18
|
+
version: 0.9.46
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.9.
|
|
25
|
+
version: 0.9.46
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rouge
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|