mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Revert "Merge pull request #873 from hgiesel/otherjsdeps"
This reverts commit62600051ae
, reversing changes made to88553acb0d
. - Standard graphs render incorrectly on latest version - the wrong number of days are shown, and the grid lines look wrong. Any version after 0.8.3 seems to suffer from this problem. - Pie graphs and stack graphs don't render - they are provided in separate files, and plot.js in previous Anki versions has them included in the one file. To maintain compatibility with add-ons, we'd need to create a single file as before, instead of importing multiple files. If the above issues are fixed I'd be happy to merge this in again, but as the old graphs are on the way out, it's probably not worth the effort.
This commit is contained in:
parent
32a5892327
commit
9e1eaacc06
7 changed files with 2286 additions and 2370 deletions
7
qt/aqt/data/web/js/vendor/BUILD.bazel
vendored
7
qt/aqt/data/web/js/vendor/BUILD.bazel
vendored
|
@ -1,20 +1,13 @@
|
|||
load("//ts:jquery.bzl", "copy_jquery")
|
||||
load("//ts:flot.bzl", "copy_flot")
|
||||
|
||||
copy_jquery(
|
||||
name = "jquery",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
copy_flot(
|
||||
name = "flot",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
||||
files = [
|
||||
"jquery",
|
||||
"flot",
|
||||
]
|
||||
|
||||
directories = [
|
||||
|
|
24
qt/aqt/data/web/js/vendor/plot.js
vendored
Normal file
24
qt/aqt/data/web/js/vendor/plot.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -197,10 +197,6 @@ def _redirectWebExports(path):
|
|||
base = "jquery.min"
|
||||
addprefix = "js/vendor/"
|
||||
|
||||
elif base == "plot":
|
||||
base = "jquery.flot"
|
||||
addprefix = "js/vendor/"
|
||||
|
||||
if addprefix:
|
||||
oldpath = path
|
||||
path = f"{targetPath}{addprefix}{base}{ext}"
|
||||
|
|
|
@ -177,7 +177,7 @@ class DeckStats(QDialog):
|
|||
self.form.web.title = "deck stats"
|
||||
self.form.web.stdHtml(
|
||||
"<html><body>" + self.report + "</body></html>",
|
||||
js=["js/vendor/jquery.min.js", "js/vendor/jquery.flot.js"],
|
||||
js=["js/vendor/jquery.min.js", "js/vendor/plot.js"],
|
||||
context=self,
|
||||
)
|
||||
self.mw.progress.finish()
|
||||
|
|
29
ts/flot.bzl
29
ts/flot.bzl
|
@ -1,29 +0,0 @@
|
|||
load("//ts:copy.bzl", "copy_files")
|
||||
|
||||
"Rule to copy flot subset from node_modules to vendor folder."
|
||||
|
||||
_include = [
|
||||
"dist/es5/jquery.flot.js",
|
||||
]
|
||||
|
||||
_unwanted_prefix = "external/npm/node_modules/flot/dist/es5/"
|
||||
|
||||
def _copy_flot_impl(ctx):
|
||||
wanted = []
|
||||
for f in ctx.attr.flot.files.to_list():
|
||||
path = f.path
|
||||
want = True
|
||||
|
||||
for substr in _include:
|
||||
if substr in path:
|
||||
output = path.replace(_unwanted_prefix, "")
|
||||
wanted.append((f, output))
|
||||
|
||||
return copy_files(ctx, wanted)
|
||||
|
||||
copy_flot = rule(
|
||||
implementation = _copy_flot_impl,
|
||||
attrs = {
|
||||
"flot": attr.label(default = "@npm//flot:flot__files"),
|
||||
},
|
||||
)
|
|
@ -61,11 +61,10 @@
|
|||
"d3-shape": "^1.3.7",
|
||||
"d3-time": "^1.1.0",
|
||||
"d3-transition": "^1.3.2",
|
||||
"flot": "^4.2.1",
|
||||
"intl-pluralrules": "^1.2.2",
|
||||
"jquery": "^3.5.1",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"jquery": "^3.5.1",
|
||||
"mathjax": "^3.1.2",
|
||||
"protobufjs": "^6.10.1"
|
||||
},
|
||||
|
|
4587
ts/yarn.lock
4587
ts/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue