thermofluids 2.0.1__tar.gz → 2.0.3__tar.gz
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.
- thermofluids-2.0.3/.gitlab-ci.yml +11 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/PKG-INFO +6 -2
- {thermofluids-2.0.1 → thermofluids-2.0.3}/README.md +4 -1
- thermofluids-2.0.3/docs/Makefile +20 -0
- thermofluids-2.0.3/docs/build/doctrees/environment.pickle +0 -0
- thermofluids-2.0.3/docs/build/doctrees/index.doctree +0 -0
- thermofluids-2.0.3/docs/build/html/.buildinfo +4 -0
- thermofluids-2.0.3/docs/build/html/_sources/index.rst.txt +68 -0
- thermofluids-2.0.3/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +123 -0
- thermofluids-2.0.3/docs/build/html/_static/base-stemmer.js +476 -0
- thermofluids-2.0.3/docs/build/html/_static/basic.css +906 -0
- thermofluids-2.0.3/docs/build/html/_static/css/badge_only.css +1 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +2671 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/css/theme.css +4 -0
- thermofluids-2.0.3/docs/build/html/_static/doctools.js +150 -0
- thermofluids-2.0.3/docs/build/html/_static/documentation_options.js +13 -0
- thermofluids-2.0.3/docs/build/html/_static/english-stemmer.js +1066 -0
- thermofluids-2.0.3/docs/build/html/_static/file.png +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bold.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bold.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bold.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bold.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-italic.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-italic.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-italic.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-italic.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-regular.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-regular.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-regular.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/Lato/lato-regular.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- thermofluids-2.0.3/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- thermofluids-2.0.3/docs/build/html/_static/jquery.js +2 -0
- thermofluids-2.0.3/docs/build/html/_static/js/badge_only.js +1 -0
- thermofluids-2.0.3/docs/build/html/_static/js/theme.js +1 -0
- thermofluids-2.0.3/docs/build/html/_static/js/versions.js +228 -0
- thermofluids-2.0.3/docs/build/html/_static/language_data.js +13 -0
- thermofluids-2.0.3/docs/build/html/_static/minus.png +0 -0
- thermofluids-2.0.3/docs/build/html/_static/plus.png +0 -0
- thermofluids-2.0.3/docs/build/html/_static/pygments.css +75 -0
- thermofluids-2.0.3/docs/build/html/_static/searchtools.js +693 -0
- thermofluids-2.0.3/docs/build/html/_static/sphinx_highlight.js +159 -0
- thermofluids-2.0.3/docs/build/html/genindex.html +477 -0
- thermofluids-2.0.3/docs/build/html/index.html +755 -0
- thermofluids-2.0.3/docs/build/html/objects.inv +0 -0
- thermofluids-2.0.3/docs/build/html/py-modindex.html +217 -0
- thermofluids-2.0.3/docs/build/html/search.html +117 -0
- thermofluids-2.0.3/docs/build/html/searchindex.js +1 -0
- thermofluids-2.0.3/docs/make.bat +35 -0
- thermofluids-2.0.3/docs/source/conf.py +34 -0
- thermofluids-2.0.3/docs/source/index.rst +68 -0
- thermofluids-2.0.3/poetry.lock +285 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/pyproject.toml +15 -2
- thermofluids-2.0.3/src/thermofluids/Base/Quantity.py +21 -0
- thermofluids-2.0.3/src/thermofluids/Base/__init__.py +0 -0
- thermofluids-2.0.3/src/thermofluids/Fluids/__init__.py +10 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Compressor.py +2 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Turbine.py +11 -7
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Valve.py +26 -0
- thermofluids-2.0.3/src/thermofluids/Properties/BrineProps.py +529 -0
- thermofluids-2.0.3/src/thermofluids/Properties/VLE_data.py +50 -0
- thermofluids-2.0.3/src/thermofluids/Properties/__init__.py +0 -0
- thermofluids-2.0.1/src/thermofluids/Base/Quantity.py +0 -16
- thermofluids-2.0.1/src/thermofluids/Fluids/__init__.py +0 -4
- {thermofluids-2.0.1 → thermofluids-2.0.3}/.idea/.gitignore +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/.idea/thermofluids.iml +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/.idea/workspace.xml +0 -0
- {thermofluids-2.0.1/src/thermofluids/Base → thermofluids-2.0.3/src}/__init__.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Base/Statepoint.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Base/ThermoExceptions.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Base/thermofluids_registry.txt +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Fluids/Drag.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Fluids/Moody.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Fluids/PressureDrop.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Fluids/Re.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/Gr.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/NTU.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/Nusselt.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/Ra.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/TwoPhase.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/__init__.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/HeatTransfer/lmtd.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Column.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Ejector.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/HeatExchanger.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/IsoCompressor.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Pipe.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/Pump.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/ProcessEquipment/__init__.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Utilities/FlowDiagram.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/Utilities/__init__.py +0 -0
- {thermofluids-2.0.1 → thermofluids-2.0.3}/src/thermofluids/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: thermofluids
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: Physically-consistent thermal and fluids modeling tools
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/ericksonla/thermofluids
|
|
6
6
|
Author: Luke Erickson, Russell Goldfarbmuren
|
|
@@ -11,6 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Requires-Python: >3.11
|
|
12
12
|
Requires-Dist: coolprop
|
|
13
13
|
Requires-Dist: pint
|
|
14
|
+
Requires-Dist: scipy
|
|
14
15
|
Description-Content-Type: text/markdown
|
|
15
16
|
|
|
16
17
|
# Thermofluids
|
|
@@ -26,4 +27,7 @@ sp.rho, sp.h, sp.visc
|
|
|
26
27
|
# (<Quantity(997.047039, 'kilogram / meter ** 3')>, <Quantity(104.918893, 'kilojoule / kilogram')>, <Quantity(0.000890022674, 'kilogram / meter / second')>)
|
|
27
28
|
````
|
|
28
29
|
|
|
29
|
-
A set of functions are made available to analyze statepoint systems in physically meaningful ways.
|
|
30
|
+
A set of functions are made available to analyze statepoint systems in physically meaningful ways.
|
|
31
|
+
|
|
32
|
+
# Documentation
|
|
33
|
+
Read the full documentation at https://thermofluids-24bc0b.gitlab.io/
|
|
@@ -11,4 +11,7 @@ sp.rho, sp.h, sp.visc
|
|
|
11
11
|
# (<Quantity(997.047039, 'kilogram / meter ** 3')>, <Quantity(104.918893, 'kilojoule / kilogram')>, <Quantity(0.000890022674, 'kilogram / meter / second')>)
|
|
12
12
|
````
|
|
13
13
|
|
|
14
|
-
A set of functions are made available to analyze statepoint systems in physically meaningful ways.
|
|
14
|
+
A set of functions are made available to analyze statepoint systems in physically meaningful ways.
|
|
15
|
+
|
|
16
|
+
# Documentation
|
|
17
|
+
Read the full documentation at https://thermofluids-24bc0b.gitlab.io/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.. Thermofluids documentation master file, created by
|
|
2
|
+
sphinx-quickstart on Thu Oct 8 13:47:07 2026.
|
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
|
4
|
+
contain the root `toctree` directive.
|
|
5
|
+
|
|
6
|
+
Thermofluids
|
|
7
|
+
============
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
.. toctree::
|
|
11
|
+
:maxdepth: 2
|
|
12
|
+
:caption: Contents:
|
|
13
|
+
|
|
14
|
+
Essential Functionality
|
|
15
|
+
_______________________
|
|
16
|
+
.. autoclass:: thermofluids.Base.Statepoint.Statepoint
|
|
17
|
+
:members: __add__, __div__
|
|
18
|
+
.. autoclass:: ...src.Base.Quantity
|
|
19
|
+
|
|
20
|
+
Fluids
|
|
21
|
+
______
|
|
22
|
+
.. automodule:: thermofluids.Fluids.Drag
|
|
23
|
+
:members: f_drag, settling_vel
|
|
24
|
+
.. automodule:: thermofluids.Fluids.Moody
|
|
25
|
+
:members: frictionfactor
|
|
26
|
+
.. automodule:: thermofluids.Fluids.Re
|
|
27
|
+
:members: Re, Re_ext
|
|
28
|
+
.. automodule:: thermofluids.Fluids.PressureDrop
|
|
29
|
+
:members: pressure_drop, pressure_drop_fitting, pressure_drop_packed_bed, pressure_drop_corrugated_plates, flow_at_dp
|
|
30
|
+
|
|
31
|
+
Heat Transfer
|
|
32
|
+
_____________
|
|
33
|
+
.. automodule:: thermofluids.HeatTransfer.lmtd
|
|
34
|
+
:members: lmtd
|
|
35
|
+
.. automodule:: thermofluids.HeatTransfer.Nusselt
|
|
36
|
+
:members: Nu, Nu_natural
|
|
37
|
+
.. automodule:: thermofluids.HeatTransfer.Ra
|
|
38
|
+
:members: Ra
|
|
39
|
+
.. automodule:: thermofluids.HeatTransfer.Gr
|
|
40
|
+
:members: Gr
|
|
41
|
+
.. automodule:: thermofluids.HeatTransfer.NTU
|
|
42
|
+
:members: NTU
|
|
43
|
+
.. automodule:: thermofluids.HeatTransfer.TwoPhase
|
|
44
|
+
:members: Co, Bo, Fr_le, crit_heat_flux, heat_flux_nucleate_boiling, htc_conv_boil
|
|
45
|
+
|
|
46
|
+
Special Properties
|
|
47
|
+
__________________
|
|
48
|
+
.. automodule:: thermofluids.Properties
|
|
49
|
+
.. automodule:: thermofluids.Properties.BrineProps
|
|
50
|
+
:members: get_c_freeze, get_T_liq_sat, get_T_vap_sat, get_P_liq_sat, get_P_vap_sat, get_h_mix, get_C_vap_sat, get_C_liq_sat
|
|
51
|
+
|
|
52
|
+
Process Equipment
|
|
53
|
+
_________________
|
|
54
|
+
.. automodule:: thermofluids.ProcessEquipment
|
|
55
|
+
.. automodule:: thermofluids.ProcessEquipment.Column
|
|
56
|
+
:members: Column
|
|
57
|
+
.. automodule:: thermofluids.ProcessEquipment.Compressor
|
|
58
|
+
:members: Compressor
|
|
59
|
+
.. automodule:: thermofluids.ProcessEquipment.HeatExchanger
|
|
60
|
+
:members: HX_Energy
|
|
61
|
+
.. automodule:: thermofluids.ProcessEquipment.IsoCompressor
|
|
62
|
+
:members: IsoCompressor
|
|
63
|
+
.. automodule:: thermofluids.ProcessEquipment.Pump
|
|
64
|
+
:members: Pump
|
|
65
|
+
.. automodule:: thermofluids.ProcessEquipment.Turbine
|
|
66
|
+
:members: Turbine
|
|
67
|
+
.. automodule:: thermofluids.ProcessEquipment.Valve
|
|
68
|
+
:members: get_valve_flow_rate, get_valve_dP, get_valve_C_v
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* Compatability shim for jQuery and underscores.js.
|
|
2
|
+
*
|
|
3
|
+
* Copyright Sphinx contributors
|
|
4
|
+
* Released under the two clause BSD licence
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* small helper function to urldecode strings
|
|
9
|
+
*
|
|
10
|
+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
|
11
|
+
*/
|
|
12
|
+
jQuery.urldecode = function(x) {
|
|
13
|
+
if (!x) {
|
|
14
|
+
return x
|
|
15
|
+
}
|
|
16
|
+
return decodeURIComponent(x.replace(/\+/g, ' '));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* small helper function to urlencode strings
|
|
21
|
+
*/
|
|
22
|
+
jQuery.urlencode = encodeURIComponent;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* This function returns the parsed url parameters of the
|
|
26
|
+
* current request. Multiple values per key are supported,
|
|
27
|
+
* it will always return arrays of strings for the value parts.
|
|
28
|
+
*/
|
|
29
|
+
jQuery.getQueryParameters = function(s) {
|
|
30
|
+
if (typeof s === 'undefined')
|
|
31
|
+
s = document.location.search;
|
|
32
|
+
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
|
33
|
+
var result = {};
|
|
34
|
+
for (var i = 0; i < parts.length; i++) {
|
|
35
|
+
var tmp = parts[i].split('=', 2);
|
|
36
|
+
var key = jQuery.urldecode(tmp[0]);
|
|
37
|
+
var value = jQuery.urldecode(tmp[1]);
|
|
38
|
+
if (key in result)
|
|
39
|
+
result[key].push(value);
|
|
40
|
+
else
|
|
41
|
+
result[key] = [value];
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* highlight a given string on a jquery object by wrapping it in
|
|
48
|
+
* span elements with the given class name.
|
|
49
|
+
*/
|
|
50
|
+
jQuery.fn.highlightText = function(text, className) {
|
|
51
|
+
function highlight(node, addItems) {
|
|
52
|
+
if (node.nodeType === 3) {
|
|
53
|
+
var val = node.nodeValue;
|
|
54
|
+
var pos = val.toLowerCase().indexOf(text);
|
|
55
|
+
if (pos >= 0 &&
|
|
56
|
+
!jQuery(node.parentNode).hasClass(className) &&
|
|
57
|
+
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
|
58
|
+
var span;
|
|
59
|
+
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
|
60
|
+
if (isInSVG) {
|
|
61
|
+
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
62
|
+
} else {
|
|
63
|
+
span = document.createElement("span");
|
|
64
|
+
span.className = className;
|
|
65
|
+
}
|
|
66
|
+
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
|
67
|
+
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
|
68
|
+
document.createTextNode(val.substr(pos + text.length)),
|
|
69
|
+
node.nextSibling));
|
|
70
|
+
node.nodeValue = val.substr(0, pos);
|
|
71
|
+
if (isInSVG) {
|
|
72
|
+
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
73
|
+
var bbox = node.parentElement.getBBox();
|
|
74
|
+
rect.x.baseVal.value = bbox.x;
|
|
75
|
+
rect.y.baseVal.value = bbox.y;
|
|
76
|
+
rect.width.baseVal.value = bbox.width;
|
|
77
|
+
rect.height.baseVal.value = bbox.height;
|
|
78
|
+
rect.setAttribute('class', className);
|
|
79
|
+
addItems.push({
|
|
80
|
+
"parent": node.parentNode,
|
|
81
|
+
"target": rect});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if (!jQuery(node).is("button, select, textarea")) {
|
|
86
|
+
jQuery.each(node.childNodes, function() {
|
|
87
|
+
highlight(this, addItems);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
var addItems = [];
|
|
92
|
+
var result = this.each(function() {
|
|
93
|
+
highlight(this, addItems);
|
|
94
|
+
});
|
|
95
|
+
for (var i = 0; i < addItems.length; ++i) {
|
|
96
|
+
jQuery(addItems[i].parent).before(addItems[i].target);
|
|
97
|
+
}
|
|
98
|
+
return result;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* backward compatibility for jQuery.browser
|
|
103
|
+
* This will be supported until firefox bug is fixed.
|
|
104
|
+
*/
|
|
105
|
+
if (!jQuery.browser) {
|
|
106
|
+
jQuery.uaMatch = function(ua) {
|
|
107
|
+
ua = ua.toLowerCase();
|
|
108
|
+
|
|
109
|
+
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
|
110
|
+
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
|
111
|
+
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
|
112
|
+
/(msie) ([\w.]+)/.exec(ua) ||
|
|
113
|
+
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
|
114
|
+
[];
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
browser: match[ 1 ] || "",
|
|
118
|
+
version: match[ 2 ] || "0"
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
jQuery.browser = {};
|
|
122
|
+
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
|
123
|
+
}
|